feat: introduce inline error messages for InstallationForm and SignUpForm

This commit is contained in:
kasia.oczkowska
2024-11-22 14:48:25 +00:00
parent 978ceaadb6
commit 54f509ee38
5 changed files with 222 additions and 168 deletions

View File

@@ -46,7 +46,12 @@ function Form(props) {
return (
<FormProvider {...methods}>
<form onSubmit={methods.handleSubmit(onSubmit)} {...formProps}>
<form
onSubmit={methods.handleSubmit((data, event) =>
onSubmit?.(data, event, methods.setError),
)}
{...formProps}
>
{render ? render(methods) : children}
</form>
</FormProvider>