Mask editor incorrect ControlValueAccessor implementation #6783
Labels
🐛 bug
Any issue that describes a bug
🧨 severity: medium
mask-editor
version: 9.1.x
✅ status: resolved
Applies to issues that have pending PRs resolving them, or PRs that have already merged.
Description
The mask editor causes the model to become dirty even before user interaction, showing invalid styling before the user interacts with the control. This is because the
writeValue
also circles back the value to the model:igniteui-angular/projects/igniteui-angular/src/lib/directives/mask/mask.directive.ts
Lines 341 to 352 in d4c72f9
Also if
updateOn: 'blur'
is used the mask never notifies the model (_onTouchedCallback
not called on blur) and thus value changes are never committed.Steps to reproduce
Result
First mask editor loads up initially with invalid visual indication (red) and the model is marked as
dirty
:The second editor even after filling up the value, remains in error style and the model is never updated:
Expected result
This first editor should not dirty flag the model on init and the second editor should correctly update the model value on blur.
The text was updated successfully, but these errors were encountered: