Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canada flag doesn't persist because it shares the same code as US #504

Open
Jcg408 opened this issue Mar 2, 2023 · 0 comments
Open

Canada flag doesn't persist because it shares the same code as US #504

Jcg408 opened this issue Mar 2, 2023 · 0 comments

Comments

@Jcg408
Copy link

Jcg408 commented Mar 2, 2023

Issue Description

When switching to Canada and inputting a valid phone number with Canadian area code, the number is registered as a US number. This is due to the fact that North American countries all have +1 as the calling code. I

This issue doesn't happen with Puerto Rico (although a separate problem is changing the code for Puerto Rico with 2 area codes) because the code is appended with area codes.

Steps to Reproduce / Code Snippets

Select Canada in the modal and input a phone number. Refresh and the flag has switched to US flag.

Expected Results

Select Canada in the modal and input a phone number. Refresh and the flag should remain as Canada. This should occur if the number is not on the Canadian area code as well. If the Country Code is set as "CA" it should not change to something else!

Additional Information

  • Nodejs version: [FILL THIS OUT]
  • React version: [FILL THIS OUT]
  • React Native version: [FILL THIS OUT]
  • react-native-country-picker-modal version: [FILL THIS OUT]
  • Platform(s) (iOS, Android, web, or all?): [FILL THIS OUT]
  • TypeScript version: [FILL THIS OUT]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant