Skip to content

Commit

Permalink
Fix Infinite render on country code change (ohcnetwork#9337)
Browse files Browse the repository at this point in the history
  • Loading branch information
JavidSumra authored Dec 11, 2024
1 parent 67f9c6e commit 7ef2299
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Form/FormFields/PhoneNumberFormField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const PhoneNumberFormField = React.forwardRef<HTMLInputElement, Props>(
}
setCountry(phoneCodes[getCountryCode(field.value)!]);
}
}, [setValue]);
}, [field.value]);

return (
<FormField
Expand Down

0 comments on commit 7ef2299

Please sign in to comment.