react-native-phone-input
react-native-phone-input copied to clipboard
Flag is not changing with phone number
Hi, I am facing a problem while changing my phone number. when I pick a country from the modal Picker and tries to change my phon number then sometimes the phone number does not reflect with that country code. Also, my flag got vanish from the input. Please see the below screenshot https://user-images.githubusercontent.com/45659052/108027275-edd7c400-704f-11eb-8716-5ae6ad5b0082.png https://user-images.githubusercontent.com/45659052/108027355-0ea01980-7050-11eb-96d8-fa67afe34af1.png
Same issue..
Its happening on android only.
Working fine on IOS.
Facing same issue.
+1
I found the problem:
in PhoneNumber.js line: 48
isNumeric(n) {
return !Number.isNaN(parseFloat(n)) && Number.isFinite(n);
}
should be:
isNumeric(n) {
return !Number.isNaN(parseFloat(n)) && !Number.isFinite(n);
}
Number.isFinite needs to be negated
https://github.com/rili-live/react-native-phone-input/pull/2
Has this problem been fixed?