mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 15:26:02 +00:00
fix(client): close the pop-up after request
This commit is contained in:
parent
a8ce758cab
commit
529380fb69
@ -228,6 +228,7 @@ export const useCustomizeRequestActionProps = () => {
|
||||
const currentUserContext = useCurrentUserContext();
|
||||
const currentUser = currentUserContext?.data?.data;
|
||||
const actionField = useField();
|
||||
const { visible, setVisible } = useActionContext();
|
||||
|
||||
return {
|
||||
async onClick() {
|
||||
@ -236,7 +237,7 @@ export const useCustomizeRequestActionProps = () => {
|
||||
if (!requestSettings['url']) {
|
||||
return;
|
||||
}
|
||||
if (skipValidator === false && xAction === 'customize:form:request') {
|
||||
if (skipValidator !== true && xAction === 'customize:form:request') {
|
||||
await form.submit();
|
||||
}
|
||||
|
||||
@ -263,12 +264,13 @@ export const useCustomizeRequestActionProps = () => {
|
||||
...requestBody,
|
||||
});
|
||||
actionField.data.loading = false;
|
||||
|
||||
service?.refresh?.();
|
||||
if (!(resource instanceof TableFieldResource)) {
|
||||
__parent?.service?.refresh?.();
|
||||
}
|
||||
|
||||
service?.refresh?.();
|
||||
if (xAction === 'customize:form:request') {
|
||||
setVisible?.(false);
|
||||
}
|
||||
if (!onSuccess?.successMessage) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user