Running saved task should save changes (#727)
This commit is contained in:
@@ -295,7 +295,7 @@ function SavedTaskForm({ initialValues }: Props) {
|
|||||||
description: "Changes saved successfully",
|
description: "Changes saved successfully",
|
||||||
});
|
});
|
||||||
queryClient.invalidateQueries({
|
queryClient.invalidateQueries({
|
||||||
queryKey: ["workflows", template],
|
queryKey: ["savedTasks", template],
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -315,12 +315,10 @@ function SavedTaskForm({ initialValues }: Props) {
|
|||||||
const submitter = (
|
const submitter = (
|
||||||
(event.nativeEvent as SubmitEvent).submitter as HTMLButtonElement
|
(event.nativeEvent as SubmitEvent).submitter as HTMLButtonElement
|
||||||
).value;
|
).value;
|
||||||
if (submitter === "save") {
|
|
||||||
form.handleSubmit(handleSave)(event);
|
|
||||||
}
|
|
||||||
if (submitter === "create") {
|
if (submitter === "create") {
|
||||||
form.handleSubmit(handleCreate)(event);
|
form.handleSubmit(handleCreate)(event);
|
||||||
}
|
}
|
||||||
|
form.handleSubmit(handleSave)(event);
|
||||||
}}
|
}}
|
||||||
className="space-y-8"
|
className="space-y-8"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user