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 = () => {
|
||||
const filterByTk = useFilterByTk();
|
||||
const { resource, service } = useBlockRequestContext();
|
||||
const { resource, service, block, __parent } = useBlockRequestContext();
|
||||
const { setVisible } = useActionContext();
|
||||
return {
|
||||
async onClick() {
|
||||
await resource.destroy({
|
||||
filterByTk,
|
||||
});
|
||||
service?.refresh?.();
|
||||
if (block !== 'TableField') {
|
||||
__parent?.service?.refresh?.();
|
||||
setVisible?.(false);
|
||||
}
|
||||
},
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user