[bug] with country flag in change moment
while i change the country in input field to Canada and i enter some number, the field automatically changes the flag from Canada to United States. This issue occurs with other countries which have same dialing code in '+1'. I see in official github and website that the issue also occurs.
Hi, assign me to make a PR please!
@JackmanBR are you sure you're typing a number with a Canadian area code? Can you give a specific example of a Canadian number that is changing the flag to another country?
Hello, I discovered that it automatically changes based on the area code, but I couldn't find where to add other area codes, and I also noticed that the error occurs with other countries with code +1, no matter the number entered, it automatically selects the United States.
As I checked it also detects Canadian area code. Actually, I do not have Canada's area codes but when you change the country to US and enter 506... as number it automatically changes to Canada.
@successbyte Yup, because 506 is a Canadian area code. You can see a list of them here: https://github.com/jackocnr/intl-tel-input/blob/master/src/js/intl-tel-input/data.ts#L197
@JackmanBR as I said before, please give me a specific example of a number that when you type it, it selects the wrong flag.
Yes, I adjusted some of its files and managed to put the local data.ts, so I'm adding more area codes manually from the countries as users report them in my application. Using the local data.ts is making things easier. Thank you very much for the feedback.