Merge pull request #335 from dodu2014/main

fix(hooks): Fix Naive Pagination's outdated API
This commit is contained in:
Soybean 2024-02-29 22:28:32 +08:00 committed by GitHub
commit b235ef3bc0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);