AstrOOnauta / react-native-international-phone-number

⚛️ International mobile phone number input component for React Native 📱
https://snack.expo.dev/@astroonauta/react-native-international-phone-number
ISC License
279 stars 52 forks source link

Difficulty setting a default value in the phone number input field. Example with a Cameroonian number. #36

Closed Chips-Analytics-Kevin closed 1 year ago

Chips-Analytics-Kevin commented 1 year ago

internationalPhone <PhoneInput customStyles={{ container: { width: 220, height: 53 }, flagContainer: { width: 80 } }} onPhoneNumberChange={(value) => handleValueChange(index, value)} // defaultValue={onEdit==true && EmergencyContactPhoneNumber[index]!==undefined ? EmergencyContactPhoneNumber[index]: ""} defaultValue="+237697645415" />

I'm trying to set +237 697645415 as the default phone number, but in the preview, I'm getting +237 69764541 instead. Do you see the difference in the image? Please let me know how to resolve ![Uploading photo_5994336850183045005_y.jpg…]()

AstrOOnauta commented 1 year ago

Hey @Chips-Analytics-Kevin I understood and sorry about this...

I fixed this issue on the next version...so, please, update your lib react-native-international-phone-number to v0.6.8 and enjoy...

🚀 AstrOOnauta 🚀

Chips-Analytics-Kevin commented 1 year ago

Great, it is amazing !! "However, I believe that many features are missing, which you could add to this library to allow users to better customize the display according to their needs. For example, the ability to show a dropdown icon to the right of the country code, as commonly seen in most phone number libraries."

AstrOOnauta commented 1 year ago

@Chips-Analytics-Kevin yeah..this project is in constant evolution...I will think about this! Thanks! =)

AstrOOnauta commented 1 year ago

@Chips-Analytics-Kevin I released a new version with your insight about dropdown icon to the right of the country code...thanks!

So, please update your lib to latest v0.7.0

🚀 AstrOOnauta 🚀