feat: collections&fields pagination issue (#653)
This commit is contained in:
parent
b215f92ecc
commit
da52cffb91
@ -25,6 +25,12 @@ const usePaginationProps = (props: TableProps<any> & { request?: any }, service)
|
|||||||
if (props?.request?.params?.pageSize) {
|
if (props?.request?.params?.pageSize) {
|
||||||
pagination.defaultPageSize = props?.request?.params?.pageSize;
|
pagination.defaultPageSize = props?.request?.params?.pageSize;
|
||||||
}
|
}
|
||||||
|
if (!pagination.total && service?.data?.meta) {
|
||||||
|
const { count, page, pageSize } = service.data.meta;
|
||||||
|
pagination.total = count;
|
||||||
|
pagination.current = page;
|
||||||
|
pagination.pageSize = pageSize;
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
showSizeChanger: true,
|
showSizeChanger: true,
|
||||||
...pagination,
|
...pagination,
|
||||||
|
Loading…
Reference in New Issue
Block a user