fix: cannot display data when remove last page and the page only just one item (#1685)
* fix: cannot display data when remove last page and the page only just one item * fix: hidden pagination when pageSize = totalSize
This commit is contained in:
parent
86de0733ad
commit
ca88638edf
@ -718,7 +718,17 @@ export const useDestroyActionProps = () => {
|
||||
await resource.destroy({
|
||||
filterByTk,
|
||||
});
|
||||
|
||||
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);
|
||||
|
@ -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) => {
|
||||
|
Loading…
Reference in New Issue
Block a user