Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Refresh items after changing filtering or sorting with DataViews #20263

Merged
merged 6 commits into from
Oct 23, 2024

Conversation

mshabarov
Copy link
Contributor

@mshabarov mshabarov commented Oct 16, 2024

Description

Refreshes items in Vaadin list components, when the filtering or sorting is changed via DataView API.

This is a behaviour change, but in the same time I believe this is a desired behaviour in most of the cases.
Let's only pick it to next release - 24.6 because of that.
We should remove dataCommunicator.reset(); via vaadin/flow-components#5304 next.

Part-of vaadin/flow-components#5303

Type of change

  • Bugfix
  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/latest/guide/contributing/overview/
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

Additional for Feature type of change

  • Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.

Copy link

github-actions bot commented Oct 16, 2024

Test Results

1 142 files  ± 0  1 142 suites  ±0   1h 22m 58s ⏱️ - 4m 46s
7 472 tests + 2  7 422 ✅ + 2  50 💤 ±0  0 ❌ ±0 
7 818 runs  +39  7 758 ✅ +39  60 💤 ±0  0 ❌ ±0 

Results for commit bfee3ed. ± Comparison against base commit 17042ce.

♻️ This comment has been updated with latest results.

Copy link
Member

@tltv tltv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JavaDoc in ListDataView could mention for setFilter, addFilter, setSortComparator, addSortComparator that refreshAll is run automatically in the end just to be clear.

@mshabarov
Copy link
Contributor Author

Added this clarification to filter, sort and also for add items methods.

Copy link

sonarcloud bot commented Oct 23, 2024

@mshabarov mshabarov merged commit 752de7f into main Oct 23, 2024
26 checks passed
@mshabarov mshabarov deleted the refresh-data-on-filter branch October 23, 2024 11:22
@vaadin-bot
Copy link
Collaborator

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

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.

3 participants