I am using some code with fields that are "required", the confirm button will not activate while they are empty. When someone else types something in the field while running it on their computer the button activates as intended, but if I do it on my computer the button does not activate, the field is still considered empty.
We are running the same code from the same branch of Github and all our dependencies are on the same version. This code is a small part of it, this error happens on all screens only on my end.
const {
control,
formState: { isValid, isDirty, errors },
handleSubmit,
reset,
register,
setError,
} = useForm();
const onSubmit = async form =>
mutation.mutate({
...form,
id: state.data.id,
esn: Number(form.esn),
});
<Controller
render={({ field: { onChange, value } }) => (
<Select
defaultValue={value}
title={language.trackerModelId}
setValue={onChange}
placeholder={language.trackerModelIdPlaceholder}
options={trackerModelData}
filterable
/>
)}
name="trackerModelId"
control={control}
rules={{ required: true }}
/>
<Input
title={language.esn}
name="esn"
register={register}
error={errors.esn?.message}
onChange={handleValidateESN}
required
upperCase
/>
Edit: If I use { mode: 'onChange' } inside the useForm then it will work correctly, but it can't be a permanent solution due to it being a code to fix a problem that only happens on my computer.