diff --git a/src/components/RegisterForm/RegisterForm.tsx b/src/components/RegisterForm/RegisterForm.tsx index e12f4c35..0c04e537 100644 --- a/src/components/RegisterForm/RegisterForm.tsx +++ b/src/components/RegisterForm/RegisterForm.tsx @@ -45,7 +45,7 @@ const defaultValues: RegisterFormValues = { } export const RegisterForm: FC = () => { - const {handleSubmit, control, watch, setValue, getValues, setError} = useForm({ + const {handleSubmit, control, watch, setValue, getValues, setError, reset} = useForm({ defaultValues, values: defaultValues, }) @@ -96,6 +96,7 @@ export const RegisterForm: FC = () => { }) const onSubmit: SubmitHandler = (data) => { + reset(undefined, {keepValues: true}) submitFormData(data) }