q-input error setting mask #14818
-
|
I'm trying to set the mask on a q-input component, depending on a model value, the model contains a record from database.
It seems an error is raised when the mask is set to empty string and the previous value is restored to model. The only solution (ugly solution) is to set the mask to "##########################". This way it shows the current values correctly. A 'clearMask' method in the q-input component hould help a lot. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
I found a workaround and I think is not an elegant solution, but it works. on the script that calls the action thar reads data from the api |
Beta Was this translation helpful? Give feedback.
I found a workaround and I think is not an elegant solution, but it works.
Before assigning the values to the model I assign them to a temp variable.
I make the evaluation of the values that will define the mask and set the mask.
After that I assign the temp variable to the model and it fills the form correctly.
I got a 2019 topic from s.molinari that suggests the mask should be set before data model (that topic was about typing on an input)