You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using server side data handling, I get inconsistent results with pagination, especially when changing search terms, but also when the sort order changes.
As far as I can tell this happens, because pagination does not automatically / correctly reset, when the "search" or "sorting" state changes even though the resetPageOnUpdat option is set to true.
This is my code for the three different "features" - maybe I'm missing something here:
Initial state. 415 results, page 1, Ascending order
Jumping to the last page.
Changing sort order (notice how gridjs says that we are on the first page, but it only displays 5 items as if we still were on the last page).
Jumping back to the last page. The state of the table doesn't change. It now is "where it should be".
Jumping back to the first page. Now we have the right result. Changed sort order and the correct results for the first page.
Search filter
When filtering it is even worse. I started at the last page (page 42 with 415 results) and entered a search term. The backend only returns 8 items, but in the request with the changed search parameter gridjs "still" tells the backend to return page 42... I expect it to send page 0 to the backend when the search term has changed.
Expected behavior
Pagination values should reset to the default / first page, when the state of the "search" or "order" features changes between calls when "resetOnPageUpdate" is set to true.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the bug
When using server side data handling, I get inconsistent results with pagination, especially when changing search terms, but also when the sort order changes.
As far as I can tell this happens, because pagination does not automatically / correctly reset, when the "search" or "sorting" state changes even though the
resetPageOnUpdat
option is set to true.This is my code for the three different "features" - maybe I'm missing something here:
Behaviour
Sort order
Initial state. 415 results, page 1, Ascending order

Jumping to the last page.

Changing sort order (notice how gridjs says that we are on the first page, but it only displays 5 items as if we still were on the last page).

Jumping back to the last page. The state of the table doesn't change. It now is "where it should be".

Jumping back to the first page. Now we have the right result. Changed sort order and the correct results for the first page.

Search filter
When filtering it is even worse. I started at the last page (page 42 with 415 results) and entered a search term. The backend only returns 8 items, but in the request with the changed search parameter gridjs "still" tells the backend to return page 42... I expect it to send page 0 to the backend when the search term has changed.

Expected behavior
Pagination values should reset to the default / first page, when the state of the "search" or "order" features changes between calls when "resetOnPageUpdate" is set to true.
The text was updated successfully, but these errors were encountered: