feat(ui): close confirm when changes not saved

This commit is contained in:
Fu Diwei
2025-01-06 00:44:06 +08:00
parent 6f1a375fee
commit 4ba7237326
22 changed files with 185 additions and 264 deletions

View File

@@ -309,7 +309,7 @@ const WorkflowBaseInfoModal = ({ trigger }: { trigger?: React.ReactNode }) => {
form: formInst,
formPending,
formProps,
...formApi
submit: submitForm,
} = useAntdForm<z.infer<typeof formSchema>>({
initialValues: { name: workflow.name, description: workflow.description },
onSubmit: async (values) => {
@@ -324,7 +324,7 @@ const WorkflowBaseInfoModal = ({ trigger }: { trigger?: React.ReactNode }) => {
});
const handleFormFinish = async () => {
return formApi.submit();
return submitForm();
};
return (