Skip to content

Commit

Permalink
fix(hooks): Fix Naive Pagination's outdated API
Browse files Browse the repository at this point in the history
  • Loading branch information
dodu2014 committed Feb 29, 2024
1 parent c3e8ef2 commit 3743612
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hooks/common/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ export function useTable<TableData extends BaseData, Fn extends ApiFn, CustomCol
pageSize: 10,
showSizePicker: true,
pageSizes: [10, 15, 20, 25, 30],
onChange: async (page: number) => {
// Fix Naive Pagination's outdated API
onUpdatePage: async (page: number) => {
pagination.page = page;

await onPaginationChanged?.(pagination);
Expand Down

0 comments on commit 3743612

Please sign in to comment.