diff --git a/comps/form/Form.tsx b/comps/form/Form.tsx index a074172..1d10b93 100755 --- a/comps/form/Form.tsx +++ b/comps/form/Form.tsx @@ -169,16 +169,10 @@ export const Form: FC = (props) => { } return (
{ + onSubmit={async (e) => { e.preventDefault(); e.stopPropagation(); - fm.status = "saving"; - fm.render(); - - fm.submit(); - - fm.status = "ready"; - fm.render(); + await fm.submit(); }} ref={(el) => { if (el) { diff --git a/comps/form/utils/init.tsx b/comps/form/utils/init.tsx index 8b0ad7b..4302ea6 100755 --- a/comps/form/utils/init.tsx +++ b/comps/form/utils/init.tsx @@ -264,10 +264,8 @@ export const formInit = (fm: FMLocal, props: FMProps) => { toast.dismiss(); - if (!success) { - fm.status = "ready"; - fm.render(); - } + fm.status = "ready"; + fm.render(); if (fm.props.sonar === "on" && !isEditor) { toast.dismiss();