Hey, I stumbled upon one issue during migration to Vue3 version of the component.
Component is mounted accordingly to the docs. But typed phone number doesn't show up in the input. I type one number in input, and after another hit in the keyboard number gets erased. I'm unable to type full number.
I copied the source code of the VueTelInput into my project and debugged the issue. It's coming from having both bindings of v-model="phone" and :value="modelValue" on <input>. Always when phone gets updated it gets overridden later with modelValue that has previous state of the phone number. Although in my Vue 3 setup I'm using Options API, not sure if it's related.
Is there any particular reason why both :value and v-model are needed?
Hey, I stumbled upon one issue during migration to Vue3 version of the component.
Component is mounted accordingly to the docs. But typed phone number doesn't show up in the input. I type one number in input, and after another hit in the keyboard number gets erased. I'm unable to type full number.
I copied the source code of the
VueTelInput
into my project and debugged the issue. It's coming from having both bindings ofv-model="phone"
and:value="modelValue"
on<input>
. Always whenphone
gets updated it gets overridden later withmodelValue
that has previous state of the phone number. Although in my Vue 3 setup I'm using Options API, not sure if it's related.Is there any particular reason why both
:value
andv-model
are needed?If I do following:
component works perfectly fine.
Thanks for the answer in the advance.