feat: restore action-hooks (#655)

This commit is contained in:
金昶 2022-07-20 14:09:58 +08:00 committed by GitHub
parent da52cffb91
commit 5d76b996ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -285,8 +285,8 @@ export const useCreateActionAndRefreshCM = () => {
const { refreshCM } = useCollectionManager();
return {
async run() {
await refreshCM();
await run();
await refreshCM();
},
};
};
@ -296,8 +296,8 @@ export const useUpdateActionAndRefreshCM = () => {
const { refreshCM } = useCollectionManager();
return {
async run() {
await refreshCM();
await run();
await refreshCM();
},
};
};
@ -307,8 +307,8 @@ export const useDestroyActionAndRefreshCM = () => {
const { refreshCM } = useCollectionManager();
return {
async run() {
await refreshCM();
await run();
await refreshCM();
},
};
};
@ -317,9 +317,9 @@ export const useBulkDestroyActionAndRefreshCM = () => {
const { run } = useBulkDestroyAction();
const { refreshCM } = useCollectionManager();
return {
async run() {
await refreshCM();
async run() {
await run();
await refreshCM();
},
};
};