Open johnkarpn opened 3 years ago
how did you cope with it?
I had to temporarily manually set the string value. That's not good
any solution?
This is still a problem as far as I can tell. I don't see a good reason why null
couldn't be used to express an empty value.
Still broken, this should really be fixed, we're using version 6.0.0-beta.6 which still works.
Hi! I found an error in my project. If you set the variable to null after loading your component, you get the error "A text for parsing must be a string". Is this behavior only in my project or is it really a component error? After this error, the component does not work
<template> <vue-tel-input v-model="obj.phone"></vue-tel-input> <button @click="clickBtn()">Set null</button> </template> <script> import { VueTelInput } from 'vue-tel-input' export default { components: { VueTelInput, }, data() { return { obj : { phone : null } }; }, methods : { clickBtn() { this.obj.phone = null; // or this.$set(this.obj, 'phone', null); } } }; </script>
Use an empty string instead of null. Example: try with:
//...
data() {
return {
obj : {
phone : ''
}
};
},
//...
This error is caused by libphonenumber-js
Hi! I found an error in my project. If you set the variable to null after loading your component, you get the error "A text for parsing must be a string". Is this behavior only in my project or is it really a component error? After this error, the component does not work