parent
78e0395960
commit
701522a060
@ -186,7 +186,7 @@ const handlePageChange = (event: BeforeUnloadEvent) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const save = async () => {
|
const save = async (throwError?: boolean) => {
|
||||||
const button = "save";
|
const button = "save";
|
||||||
buttons.loading("save");
|
buttons.loading("save");
|
||||||
|
|
||||||
@ -197,6 +197,7 @@ const save = async () => {
|
|||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
buttons.done(button);
|
buttons.done(button);
|
||||||
$showError(e);
|
$showError(e);
|
||||||
|
if (throwError) throw e;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -223,8 +224,10 @@ const close = () => {
|
|||||||
finishClose();
|
finishClose();
|
||||||
},
|
},
|
||||||
saveAction: async () => {
|
saveAction: async () => {
|
||||||
await save();
|
try {
|
||||||
finishClose();
|
await save(true);
|
||||||
|
finishClose();
|
||||||
|
} catch {}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user