feat: o2m delete not refresh (#646)
* feat: o2m delete not refresh * feat: add TableField judgment
This commit is contained in:
parent
c86b6f9a06
commit
5b61587a39
@ -388,13 +388,18 @@ export const useUpdateActionProps = () => {
|
|||||||
|
|
||||||
export const useDestroyActionProps = () => {
|
export const useDestroyActionProps = () => {
|
||||||
const filterByTk = useFilterByTk();
|
const filterByTk = useFilterByTk();
|
||||||
const { resource, service } = useBlockRequestContext();
|
const { resource, service, block, __parent } = useBlockRequestContext();
|
||||||
|
const { setVisible } = useActionContext();
|
||||||
return {
|
return {
|
||||||
async onClick() {
|
async onClick() {
|
||||||
await resource.destroy({
|
await resource.destroy({
|
||||||
filterByTk,
|
filterByTk,
|
||||||
});
|
});
|
||||||
service?.refresh?.();
|
service?.refresh?.();
|
||||||
|
if (block !== 'TableField') {
|
||||||
|
__parent?.service?.refresh?.();
|
||||||
|
setVisible?.(false);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user