vue-tel-input
vue-tel-input copied to clipboard
autoDefaultCountry overrides country
Using version 5.5 with Vue v2.6.14
If autoDefaultCountry is active (default) the country of a given phone number gets overwritten. Looks like a race condition where the value gets set through the v-model and the code for checking the default country is done after that.
For example with default country Switzerland and suppling a German phone number through v-model the following happens:
- Page is build
- v-model gets set
- German phone number is recognized and German flag shown
- Swiss flag shows after a short while and +49 on phone number gets replaced by +41
Switching autoDefaultCountry off through the options fixes the problem. However then the default country is set to Afghanistan.
Using the following options works as intended:
autoDefaultCountry: false defaultCountry: "CH"
+1 this problem in Vue project "vue-tel-input": "^5.6.2",
+1. @iamstevendao can we get a response about this issue? Looks pretty important