Comments (5)
After a few tests, I believe it has to do with async data piped through from the parent wrapper component. Within the vue-tel-input component, there is only a created() hook that sets the internal phone data value, but not an updated() method. Here's how I was able to resolve in my parent wrapper.
First, give the vue-tel-input a ref attribute
<vue-tel-input
ref="tel"
:value="value"
:placeholder=placeholder
@onInput="onInput"
></vue-tel-input>
Then, add an updated method to the parent wrapper. This assumes you are setting a data property called value.
updated() {
const child = this.$refs.tel;
if(!child.phone) {
child.phone = this.value;
}
},
from vue-tel-input.
@devinle @ATselikovSnp done, fixed in v2.0.5. Sorry for the delay guys.
from vue-tel-input.
I have the same problem, my dirty fix for this issue is to clear field by js.. Don't do this in Home ;) - example: document.querySelectorAll("#tel2 > input")[0].value = '';
from vue-tel-input.
@devinle Thanks for bearing with us, I will take a look on this issue asap.
from vue-tel-input.
from vue-tel-input.
Related Issues (20)
- Search Box placeholder HOT 4
- Vue-tel-input veevalidate HOT 1
- Props for aria-label of Country code selector button
- Not able to set aria-invalid on the input-field
- TypeScript support non-existant
- Autoformat breaks with newer version (Maximum recursive updates exceeded in component) HOT 9
- Update all-countries.js [main & legacy branches] HOT 7
- @on-input -> @update:model-value
- Uncaught SyntaxError: Unexpected token {
- integrate vue-tel-input and vue-hook-form
- In monorepos the Vue instance is not correctly resolved HOT 2
- Error after tabbing to the dropdown field HOT 1
- After entering more than 10 numbers on a US phone number, the component breaks and will not allow further editing of a number HOT 4
- The website in npm website is not working HOT 1
- Documentation website returns 404 HOT 1
- Infinite loop with customValidate
- Doesn't sniff default country code using fallbacks when ad block is installed
- Input Field Validation: Field Remains Invalid After Clearing a Valid Phone Number
- Country Dropdown doesn't go back to the position of the last selected country
- vue3 cannot be used when using a CDN global build HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-tel-input.