feat(web): disable submit while saving + Save & create another + Cmd/Ctrl+Enter (#46)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-07 23:15:21 +02:00
parent ed0c13907c
commit 3900bc362c
7 changed files with 122 additions and 25 deletions
+3 -2
View File
@@ -61,7 +61,7 @@ function ObjectEditFormLoaded({ object, id }: { object: AdminObjectView; id: str
const defaults = { core, fields: object.fields };
const onSubmit = async (values: ObjectFormValues) => {
const onSubmit = async (values: ObjectFormValues): Promise<boolean> => {
setError(null);
setFieldErrorKey(null);
@@ -76,10 +76,11 @@ function ObjectEditFormLoaded({ object, id }: { object: AdminObjectView; id: str
setError(t("form.rejected"));
}
return;
return false;
}
navigate(`/objects/${id}`);
return true;
};
return (