Running saved task should save changes (#727)

This commit is contained in:
Kerem Yilmaz
2024-08-25 19:26:28 +03:00
committed by GitHub
parent 4c33c48c91
commit a1cd6dfd72

View File

@@ -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"
> >