goveo / react-international-phone

☎️ International phone input component for React
https://react-international-phone.vercel.app/
MIT License
295 stars 54 forks source link

Canada flag changes to USA when filling input #165

Closed esau-morais closed 8 months ago

esau-morais commented 8 months ago

Describe the bug Canada flag changes to USA when filling input

To Reproduce Steps to reproduce the behavior:

  1. Go to main page
  2. Choose canada flag
  3. Enter a phone number
  4. Notice that the country flag changes to USA

Expected behavior Country flag should stay the same

Desktop (please complete the following information):

esau-morais commented 8 months ago

I noticed that this happens because it doesn't start with one of the numbers in the array provided to the countryData

salamatsu commented 4 months ago

image

i tried valid Canadian number same applies to other mobile number like Puerto Rico