Skip to content

Commit 95c8def

Browse files
authored
Merge pull request #1334 from cpba/fix-resetpageonupdate
Correctly set page prop back to 0 when resetPageOnUpdate is enabled
2 parents 3c93b58 + 646e7a3 commit 95c8def

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/view/plugin/pagination.tsx

+6
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ export function Pagination() {
8888
// when a processor is updated for some reason
8989
if (resetPageOnUpdate && updatedProcessor !== processor.current) {
9090
setCurrentPage(0);
91+
92+
if (processor.current.props.page !== 0) {
93+
processor.current.setProps({
94+
page: 0,
95+
});
96+
}
9197
}
9298
};
9399

0 commit comments

Comments
 (0)