Format number after changing country code
This commit is contained in:
@ -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}
|
||||
|
||||
Reference in New Issue
Block a user