fix: incorrect pagination query parameters when batch deleting last page (#3670)

This commit is contained in:
katherinehhh 2024-03-12 21:29:47 +08:00 committed by GitHub
parent a8e37f6224
commit b4058ecb1b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -986,6 +986,11 @@ export const useBulkDestroyActionProps = () => {
filterByTk: field.data?.selectedRowKeys,
});
field.data.selectedRowKeys = [];
const currentPage = service.params[0]?.page;
const totalPage = service.data?.meta?.totalPage;
if (currentPage === totalPage) {
service.params[0].page = currentPage - 1;
}
service?.refresh?.();
},
};