I faced with the problem when I re-set the value (set, clear, and set again) to the mask component using v-model
Mask Settings
mask: "+998 (##) ###-##-##"
value: "+998901234567"
masked: false
Expected result
According to nature of the mask component, it re-evaluates the set value, omits predefined values (+998) and returns plain numbers (901234567).
Actual result
However, re-evaluation doesn't work when you re-set the same value again. For example, I set "+998901234567" value, cleared it, and re-set the same value. The re-evaluated output was:
Description of the problem
I faced with the problem when I re-set the value (set, clear, and set again) to the mask component using v-model
Mask Settings
mask: "+998 (##) ###-##-##"
value: "+998901234567"
masked: false
Expected result
According to nature of the mask component, it re-evaluates the set value, omits predefined values (
+998
) and returns plain numbers (901234567
).Actual result
However, re-evaluation doesn't work when you re-set the same value again. For example, I set
"+998901234567"
value, cleared it, and re-set the same value. The re-evaluated output was:"901234567"
""
"+998901234567"
Example
Link to codesandbox: https://codesandbox.io/s/vue-the-mask-component-error-ngwot?file=/src/App.vue