mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 15:35:28 +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 currentUserContext = useCurrentUserContext();
|
||||||
const currentUser = currentUserContext?.data?.data;
|
const currentUser = currentUserContext?.data?.data;
|
||||||
const actionField = useField();
|
const actionField = useField();
|
||||||
|
const { visible, setVisible } = useActionContext();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
async onClick() {
|
async onClick() {
|
||||||
@ -236,7 +237,7 @@ export const useCustomizeRequestActionProps = () => {
|
|||||||
if (!requestSettings['url']) {
|
if (!requestSettings['url']) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (skipValidator === false && xAction === 'customize:form:request') {
|
if (skipValidator !== true && xAction === 'customize:form:request') {
|
||||||
await form.submit();
|
await form.submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -263,12 +264,13 @@ export const useCustomizeRequestActionProps = () => {
|
|||||||
...requestBody,
|
...requestBody,
|
||||||
});
|
});
|
||||||
actionField.data.loading = false;
|
actionField.data.loading = false;
|
||||||
|
|
||||||
service?.refresh?.();
|
|
||||||
if (!(resource instanceof TableFieldResource)) {
|
if (!(resource instanceof TableFieldResource)) {
|
||||||
__parent?.service?.refresh?.();
|
__parent?.service?.refresh?.();
|
||||||
}
|
}
|
||||||
|
service?.refresh?.();
|
||||||
|
if (xAction === 'customize:form:request') {
|
||||||
|
setVisible?.(false);
|
||||||
|
}
|
||||||
if (!onSuccess?.successMessage) {
|
if (!onSuccess?.successMessage) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user