Skip to content

Commit

Permalink
Merge pull request #1334 from cpba/fix-resetpageonupdate
Browse files Browse the repository at this point in the history
Correctly set page prop back to 0 when resetPageOnUpdate is enabled
  • Loading branch information
afshinm authored Mar 3, 2024
2 parents 3c93b58 + 646e7a3 commit 95c8def
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/view/plugin/pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ export function Pagination() {
// when a processor is updated for some reason
if (resetPageOnUpdate && updatedProcessor !== processor.current) {
setCurrentPage(0);

if (processor.current.props.page !== 0) {
processor.current.setProps({
page: 0,
});
}
}
};

Expand Down

0 comments on commit 95c8def

Please sign in to comment.