yogakurniawan / vue-tel-input-vuetify

International Telephone Input with Vuetify.
https://yogakurniawan.github.io/vue-tel-input-vuetify/
MIT License
96 stars 57 forks source link

Existing phone number becomes `+undefined` when using `showDialCode: true` #108

Open x3rAx opened 1 year ago

x3rAx commented 1 year ago

Current behavior

When adding the prop :input-options="{showDialCode: true}" the the phone number in the v-model is changed to +undefined if the number already contains a country code when the component is loaded.

Expected behavior

The number should not be changed and the flag should be set according to the country code of the number

Versions

Libraries:

Environment:

Additional context

PR incoming :wink:

fitzhavey commented 1 year ago

Looks like this only happens if the data is passed to the component before the mounted() hook runs, if you leave the component alone until then - everything is fine!