Skip to content

fix: properly update client side filtering flag - #5217

Merged
sissbruecker merged 4 commits into
mainfrom
fix/combo_box_refresh_after_custom_value_set
Jul 5, 2023
Merged

sissbruecker merged 4 commits into
mainfrom
fix/combo_box_refresh_after_custom_value_set

Conversation

@sissbruecker

@sissbruecker sissbruecker commented Jul 3, 2023 •

Copy link
Copy Markdown
Member

Description

Refreshing the ListDataProvider of a multi-select combo box directly when receiving a custom value can lead to the component getting stuck in client-side filtering mode. The issue seems to be that the component updates the _clientSideFilter flag before the data communicator has calculated the new item count, which enables client-side filtering because the number of items is less than the page size (using the filter for the custom value, only the newly added item for the custom value matches).

This changes the logic so that the flag is only updated after the data communicator has updated the item count, by listening for the ItemCountChangeEvent.

Fixes #4884

Type of change

  • Bugfix

@sissbruecker
sissbruecker force-pushed the fix/combo_box_refresh_after_custom_value_set branch from 964702d to 37f1cd2 Compare July 3, 2023 11:28
@sonarqubecloud

sonarqubecloud Bot commented Jul 3, 2023

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sissbruecker
sissbruecker merged commit a779b24 into main Jul 5, 2023
@sissbruecker
sissbruecker deleted the fix/combo_box_refresh_after_custom_value_set branch July 5, 2023 08:53
vaadin-bot pushed a commit that referenced this pull request Jul 5, 2023
* fix: properly update client side filtering flag

* add integration test

* revert ignored test

* cleanup
vaadin-bot pushed a commit that referenced this pull request Jul 5, 2023
* fix: properly update client side filtering flag

* add integration test

* revert ignored test

* cleanup
vaadin-bot pushed a commit that referenced this pull request Jul 5, 2023
* fix: properly update client side filtering flag

* add integration test

* revert ignored test

* cleanup
sissbruecker added a commit that referenced this pull request Jul 5, 2023
* fix: properly update client side filtering flag

* add integration test

* revert ignored test

* cleanup

Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com>
sissbruecker added a commit that referenced this pull request Jul 5, 2023
* fix: properly update client side filtering flag

* add integration test

* revert ignored test

* cleanup

Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com>
sissbruecker added a commit that referenced this pull request Jul 5, 2023
…5222)

* fix: properly update client side filtering flag (#5217)

* fix: properly update client side filtering flag

* add integration test

* revert ignored test

* cleanup

* replace toList API usage

---------

Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com>
@vaadin-bot

Copy link
Copy Markdown
Collaborator

This ticket/PR has been released with Vaadin 24.2.0.alpha3 and is also targeting the upcoming stable 24.2.0 version.

@vaadin-bot

Copy link
Copy Markdown
Collaborator

This ticket/PR has been released with Vaadin 23.3.17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MultiSelectComboBox] Custom values with list data provider do not work on first custom value added

3 participants