fix(hooks): Fix Naive Pagination's outdated API

This commit is contained in:
tnt group 2024-02-29 22:22:15 +08:00
parent c3e8ef2ed2
commit 3743612d62

View File

@ -83,7 +83,8 @@ export function useTable<TableData extends BaseData, Fn extends ApiFn, CustomCol
pageSize: 10, pageSize: 10,
showSizePicker: true, showSizePicker: true,
pageSizes: [10, 15, 20, 25, 30], pageSizes: [10, 15, 20, 25, 30],
onChange: async (page: number) => { // Fix Naive Pagination's outdated API
onUpdatePage: async (page: number) => {
pagination.page = page; pagination.page = page;
await onPaginationChanged?.(pagination); await onPaginationChanged?.(pagination);