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
When using a mask array in the v-mask directive, it is not possible to set a null value in the v-model. This makes it impossible to reset the form data.
Example of using the mask: <input v-model="CpfCnpj" type="text" v-mask="['###.###.###-##', '##.###.###/####-##']" /> <button @click="CpfCnpj = null"> Clear </button>
To Reproduce
Steps to reproduce the behavior:
Use a mask array in the mask directive as in the example: v-mask="['###.###.###-##', '##.###.###/## ##-##']"
set value in v-model ex: <button @click="CpfCnpj = 00133266545"> Set Value </button>
Set a null value in the v-model of the component where the mask array is used. <button @click="CpfCnpj = null"> Clear </button>
When setting null value in v-model, it is not applied.
Expected behavior
It must be possible to set a null value in the v-model that has the mask array
Desktop (please complete the following information):
OS: Microsoft Windows 11 Pro - v 10.0.22000 - 22000
Browser [Chrome]
Version [v 104.0.5112.82 - 64 bits]
Additional context
Only the component that uses a mascara array doesn't allow to set null value in v-model. So correctly a form is impossible.
The text was updated successfully, but these errors were encountered:
eder-ferraz-caciano
changed the title
It is not possible to set null value in capos v-model with mask array v-mask="['###.###.###-##', '##.###.###/####-##']"
Cannot set null value in v-model fields with mask array v-mask="['###.###.###-##', '##.###.### / ####-##']"
Aug 22, 2022
Describe the bug
When using a mask array in the v-mask directive, it is not possible to set a null value in the v-model. This makes it impossible to reset the form data.
Example of using the mask:
<input v-model="CpfCnpj" type="text" v-mask="['###.###.###-##', '##.###.###/####-##']" />
<button @click="CpfCnpj = null"> Clear </button>
To Reproduce
Steps to reproduce the behavior:
<button @click="CpfCnpj = 00133266545"> Set Value </button>
<button @click="CpfCnpj = null"> Clear </button>
Expected behavior
It must be possible to set a null value in the v-model that has the mask array
Desktop (please complete the following information):
Additional context
Only the component that uses a mascara array doesn't allow to set null value in v-model. So correctly a form is impossible.
The text was updated successfully, but these errors were encountered: