Open pavelshtanko opened 7 years ago
The default Mask definitions are { '9': /\d/, 'A': /[a-zA-Z]/, '*': /[a-zA-Z0-9]/ }
. This means that if you use anything other than "9", "A", or "*" in your mask definition, such as the "1" in your example, it's going to be considered a hard-coded literal character rather than part of the user-entered value, causing the behavior you're seeing. You can work around this by providing your own mask definition allowing for "1" as a mask symbol accepting only the numeral 1 - this'll cause the "1" to be considered part of the input's value just like the other digits.
That's strange solution. I may have multiple sets of mask definitions - sometimes 1 shoud act like a placeholder and sometimes not. Different countries have different codes.
And btw it leads to the next issue with the directive. When I'm trying to override the the default mask definitions the old definitions are still in game.
For instance I have the input with the mask:
1 (999) 999 99 99
When the model for the imput is12345678900
I've got the viewValue as1 (123) 456 78 90
.The first pre-defined letter has been added + the phone number has been cutted (last 0).
Any propositions?