fix(ui): antd nested form bugs
This commit is contained in:
@@ -31,6 +31,8 @@ const Login = () => {
|
||||
await navigage("/");
|
||||
} catch (err) {
|
||||
notificationApi.error({ message: t("common.text.request_error"), description: getErrMsg(err) });
|
||||
|
||||
throw err;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
@@ -43,6 +43,8 @@ const SettingsAccount = () => {
|
||||
}, 500);
|
||||
} catch (err) {
|
||||
notificationApi.error({ message: t("common.text.request_error"), description: getErrMsg(err) });
|
||||
|
||||
throw err;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
@@ -47,6 +47,8 @@ const SettingsPassword = () => {
|
||||
}, 500);
|
||||
} catch (err) {
|
||||
notificationApi.error({ message: t("common.text.request_error"), description: getErrMsg(err) });
|
||||
|
||||
throw err;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
@@ -316,9 +316,9 @@ const WorkflowBaseInfoModal = ({ trigger }: { trigger?: React.ReactNode }) => {
|
||||
try {
|
||||
await workflowState.setBaseInfo(values.name!, values.description!);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
notificationApi.error({ message: t("common.text.request_error"), description: getErrMsg(err) });
|
||||
return false;
|
||||
|
||||
throw err;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
@@ -216,7 +216,7 @@ const WorkflowList = () => {
|
||||
<Tooltip title={t("workflow.action.delete")}>
|
||||
<Button
|
||||
color="danger"
|
||||
danger={true}
|
||||
danger
|
||||
icon={<DeleteOutlinedIcon />}
|
||||
variant="text"
|
||||
onClick={() => {
|
||||
|
||||
@@ -73,10 +73,9 @@ const WorkflowNew = () => {
|
||||
workflow = await saveWorkflow(workflow);
|
||||
navigate(`/workflows/${workflow.id}`, { replace: true });
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
notificationApi.error({ message: t("common.text.request_error"), description: getErrMsg(err) });
|
||||
|
||||
return false;
|
||||
throw err;
|
||||
}
|
||||
},
|
||||
});
|
||||
@@ -155,6 +154,7 @@ const WorkflowNew = () => {
|
||||
</div>
|
||||
|
||||
<ModalForm
|
||||
{...formProps}
|
||||
disabled={formPending}
|
||||
layout="vertical"
|
||||
form={formInst}
|
||||
@@ -165,7 +165,6 @@ const WorkflowNew = () => {
|
||||
width={480}
|
||||
onFinish={handleModalFormFinish}
|
||||
onOpenChange={handleModalOpenChange}
|
||||
{...formProps}
|
||||
>
|
||||
<Form.Item name="name" label={t("workflow.new.modal.form.name.label")} rules={[formRule]}>
|
||||
<Input ref={(ref) => setTimeout(() => ref?.focus({ cursor: "end" }), 0)} placeholder={t("workflow.new.modal.form.name.placeholder")} />
|
||||
|
||||
Reference in New Issue
Block a user