Format number after changing country code

This commit is contained in:
Justin
2022-07-14 14:08:59 -04:00
parent 07f6935789
commit 150510bc8a

View File

@ -59,6 +59,10 @@ const PhoneInput: React.FC<IPhoneInput> = (props) => {
}
}, [countryCode, nationalNumber]);
useEffect(() => {
handleChange({ target: { value: nationalNumber } } as any);
}, [countryCode, nationalNumber]);
return (
<Input
onChange={handleChange}