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

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

Open
x3rAx opened this issue Apr 20, 2023 · 1 comment · May be fixed by #109 or #113
Open

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

x3rAx opened this issue Apr 20, 2023 · 1 comment · May be fixed by #109 or #113

Comments

@x3rAx
Copy link

x3rAx commented Apr 20, 2023

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:

  • vue-tel-input-vuetify version: 1.5.3
  • vue version: 2.7.14

Environment:

  • Device: Framework Laptop
  • OS: NixOS 22.11
  • Browser: Firefox
  • Browser Version: 112.0

Additional context

PR incoming 😉

x3rAx added a commit to x3rAx/vue-tel-input-vuetify that referenced this issue Apr 20, 2023
@x3rAx x3rAx changed the title Existing phone number becomes +undefined when using :input-options="{showDialCode: true}" Existing phone number becomes +undefined when using showDialCode: true Apr 20, 2023
@x3rAx x3rAx linked a pull request Apr 20, 2023 that will close this issue
@fitzhavey
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants