catamphetamine / react-phone-number-input

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

Add international to countryOptionsOrder #374

Closed Florian54640 closed 3 years ago

Florian54640 commented 3 years ago

Hello,

With version 3.1.2 I can't put the international option in the countryOptionsOrder I tried with undefined and "ZZ" but I got an error message saying it can't find the country code.

there is an exemple of my code : <PhoneInput international // flags={flags} defaultCountry="BE" labels={en} countryOptionsOrder={["BE", "FR", "LU", "NL", "|", "..."]}

I have an error if i put the undefined or "ZZ" before the "BE" But i read is possible in this issues : https://github.com/catamphetamine/react-phone-number-input/issues/190

In addition I noticed another problem at the level of the demo (the example with the default country on "Force international format") if we enter a number then we delete it we fall on the international icon but in this case it is impossible to choose the first country from the list here Afghanistan

catamphetamine commented 3 years ago

See react-phone-number-input@3.1.6.

With version 3.1.2 I can't put the international option in the countryOptionsOrder I tried with undefined and "ZZ" but I got an error message saying it can't find the country code.

Added "🌐" option for "International".

In addition I noticed another problem at the level of the demo (the example with the default country on "Force international format") if we enter a number then we delete it we fall on the international icon but in this case it is impossible to choose the first country from the list here Afghanistan

Fixed.

Florian54640 commented 3 years ago

it's perfect thanks !!!