Noticed an issue with DataTable that affects pagination, when filters that affect the rowset are changed, and produce a subset with less pages than the currently selected page.
This does not affect the search field. An example as seen in the screen shots attached, is having an external buttongroup or dropdown as a filter.
Steps to Reproduce
write a query that triggers pagination
add a filtering widget (e.g. dropdown, buttongroup, etc.) that reduces the number of pages when activated. You must be able to toggle it on and off
Start with the filter that produces the most amount of rows
select the last page
Toggle the filter to the lesser result size
Pagination should now show a current page that is greater than the total number of pages
Describe the bug
Noticed an issue with DataTable that affects pagination, when filters that affect the rowset are changed, and produce a subset with less pages than the currently selected page.
This does not affect the search field. An example as seen in the screen shots attached, is having an external buttongroup or dropdown as a filter.
![evidence-datatable-3](https://github.com/evidence-dev/evidence/assets/36790149/ace35a72-8b69-4fc3-a88a-9bb5598fb901)
Steps to Reproduce
Pagination should now show a current page that is greater than the total number of pages
Logs
No response
System Info
Severity
annoyance
Additional Information, or Workarounds
Patched locally by appending
after https://github.com/evidence-dev/evidence/blob/5ec75c1a4f180e1f1c7420e31a89f35eb2a4422b/packages/ui/core-components/src/lib/unsorted/viz/table/_DataTable.svelte#L334