Skip to content

Commit

Permalink
Fixed error on registration (#465)
Browse files Browse the repository at this point in the history
* Fixed error on registration

* Changed reset params
  • Loading branch information
vgeffer authored Nov 23, 2024
1 parent 2a27266 commit 37e7ddd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/RegisterForm/RegisterForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const defaultValues: RegisterFormValues = {
}

export const RegisterForm: FC = () => {
const {handleSubmit, control, watch, setValue, getValues, setError} = useForm<RegisterFormValues>({
const {handleSubmit, control, watch, setValue, getValues, setError, reset} = useForm<RegisterFormValues>({
defaultValues,
values: defaultValues,
})
Expand Down Expand Up @@ -96,6 +96,7 @@ export const RegisterForm: FC = () => {
})

const onSubmit: SubmitHandler<RegisterFormValues> = (data) => {
reset(undefined, {keepValues: true})
submitFormData(data)
}

Expand Down

0 comments on commit 37e7ddd

Please sign in to comment.