Skip to content

Commit

Permalink
Reset page prop when resetPageOnUpdate is enabled
Browse files Browse the repository at this point in the history
otherwise the current page will be set to 0 but the prop will still
retain its old value, causing issues with server side pagination.
  • Loading branch information
cpba committed Mar 12, 2023
1 parent 6275e01 commit 86a0a01
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/view/plugin/pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ export function Pagination() {
// when a processor is updated for some reason
if (resetPageOnUpdate && updatedProcessor !== processor.current) {
setCurrentPage(0);

processor.current.setProps({
page: 0,
});
}
};

Expand Down

0 comments on commit 86a0a01

Please sign in to comment.