You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
watch: {
mask(newMask, oldMask) {
// Check if the mask has changed (Vue cannot detect whether an array has changed)
if (this.mask !== oldMask) {
this.bind()
}
},
its tries to compare the arrays and they are always different so it call "this.bind" that triggers a useless "input" event.
The text was updated successfully, but these errors were encountered:
Error:
When having two masked-input in the same component and one of them emits a value all of the component emits a input value
Reproduction sandbox here : https://codesandbox.io/s/dreamy-shadow-p8df5?file=/src/App.vue
Look the console when you change the value of the first input or the second its also emit a value for ALL masked-input components.
I debugged it and its caused by the "mask" watcher here :
text-mask/vue/src/vueTextMask.js
Line 89 in 059c863
watch: {
mask(newMask, oldMask) {
// Check if the mask has changed (Vue cannot detect whether an array has changed)
if (this.mask !== oldMask) {
this.bind()
}
},
its tries to compare the arrays and they are always different so it call "this.bind" that triggers a useless "input" event.
The text was updated successfully, but these errors were encountered: