Skip to content

Commit

Permalink
fix onSubmitHandler. теперь функция останавливается. если есть не вал…
Browse files Browse the repository at this point in the history
…идное поле
  • Loading branch information
VanyaMate committed Apr 8, 2024
1 parent fc2be2c commit b0a4743
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/shared/ui/forms/hooks/useForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const useForm = function <T extends FormReturnType> (props: UseFormProps<
const input = props.inputs[i];
if (!input.isValid) {
input.inputRef.current?.focus();
break;
return;
}
data[input.name] = input.value.current;
}
Expand Down

0 comments on commit b0a4743

Please sign in to comment.