diff --git a/packages/core/client/src/block-provider/hooks/index.ts b/packages/core/client/src/block-provider/hooks/index.ts index df3c74e4a..98e67709c 100644 --- a/packages/core/client/src/block-provider/hooks/index.ts +++ b/packages/core/client/src/block-provider/hooks/index.ts @@ -718,7 +718,17 @@ export const useDestroyActionProps = () => { await resource.destroy({ filterByTk, }); - service?.refresh?.(); + + const { count = 0, page = 0, pageSize = 0 } = service?.data?.meta || {}; + if (count % pageSize === 1) { + service.run({ + ...service?.params?.[0], + page: page - 1, + }); + } else { + service?.refresh?.(); + } + if (block !== 'TableField') { __parent?.service?.refresh?.(); setVisible?.(false); diff --git a/packages/core/client/src/schema-component/antd/table-v2/Table.tsx b/packages/core/client/src/schema-component/antd/table-v2/Table.tsx index 0ccb7bab0..9bb8aae86 100644 --- a/packages/core/client/src/schema-component/antd/table-v2/Table.tsx +++ b/packages/core/client/src/schema-component/antd/table-v2/Table.tsx @@ -131,7 +131,7 @@ const usePaginationProps = (pagination1, pagination2) => { ...pagination1, ...pagination2, }; - return result.total < result.pageSize ? false : result; + return result.total <= result.pageSize ? false : result; }; const useValidator = (validator: (value: any) => string) => {