-
Notifications
You must be signed in to change notification settings - Fork 377
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: Pagination state is not updating in the UI when filtering returns less pages of results than the current page index using a FluentDataGrid with ItemsProvider in FluentPaginator #1596
Comments
@vnbaaij I changed it to not be readonly, but still seeing the same behavior. Here's test code with the readonly attribute removed.
|
@vnbaaij I think your simulation is not correct. Before filtering by a column, you need to go to a page that will not exist after filtering (@NickHirras changed to the 4th page before filtering by the column, and the filtered data has only one page of results). |
I closed it too early but will be fixed with PR mentioned above and will be in next release. |
🐛 Bug Report
I have a data table using pagination, and remote data retrieved through ItemsProvider.
If I page ahead (for example, to page 3 of the current results), and then I adjust a filter to return less than 3 pages of results, the paginator UI does not update correctly. I can see it results in two data retrievals. First one includes the new items count that is less than the currently selected page index, which in the FluentPaginator component triggers a re-retrieval for whatever the calculated last page of results would be.
My DataGrid is refreshing correctly, but my Paginator is still showing the wrong page number and page count. Until I press one of the pagination buttons, which seems to trigger the UI refresh and then it's correct.
I'm hoping I've just made some fundamental mistake in my code, and maybe you can point me towards the solution, if this is not in fact a bug.
💻 Repro or Code Sample
Here's a complete working sample page.
🤔 Expected Behavior
When filtering results in the paginator needing to jump back to a valid page, I expect the paginator UI to update showing the correct current page and page count.
😯 Current Behavior
You can reproduce by running the page, and following these steps.
see screen recording:
Screen.Recording.2024-02-27.at.1.35.54.PM.mov
💁 Possible Solution
🔦 Context
🌍 Your Environment
The text was updated successfully, but these errors were encountered: