catamphetamine / react-phone-number-input

React component for international phone number input
http://catamphetamine.gitlab.io/react-phone-number-input/
MIT License
925 stars 194 forks source link

Slow validate USA phone #315

Closed DinAlla closed 4 years ago

DinAlla commented 4 years ago

Hi! I have this code: <PhoneInput value={phoneValue} onBlur={onBlur} onFocus={onFocus} onChange={onPhoneInputChange} />

If I try to input number - data validate and I see country. Example: image

But when I try to input USA number, I see this: image

And only after input full number I see country flag: image

How I can see USA flag after input first part of number (I know that I can use country or default country, but I want to see code in input "+1..." and if I use it (country or default country) I can't see code in input - in value I have, but it's not I need)?

catamphetamine commented 4 years ago

See the bug reporting instructions https://github.com/catamphetamine/react-phone-number-input#bug-reporting If the demo's behavior is different from Google's demo, then reopen this issue.

catamphetamine commented 4 years ago

https://libphonenumber.appspot.com/phonenumberparser?number=%2B12134454215 Until the last digit is input: https://libphonenumber.appspot.com/phonenumberparser?number=%2B1213445421 No region, so this is the correct behavior.