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
The onChange is triggered when mask changed even if the triggerOnMaskChange is false.
The if (this.writingValue || (!this.triggerOnMaskChange && this.maskChanged)) should never trigger onChange. In the case in latest versions the function always call onChange if this.maskChanged is true.
If this is a wanted behaviour we need a configuration variable to choose if we want the onChange triggered when maskChanged.
🐞 bug report
Is this a regression?
Yes, the previous version in which this bug was not present was: 16.2.4Description
The onChange is triggered when [mask] updating after init. Input becomes dirty when maskChanged.🔬 Minimal Reproduction
https://stackblitz.com/edit/angular-ivy-mask-qy4mdv?file=src%2Fapp%2Fapp.component.html
The problem comes from this behaviour : https://github.com/JsDaddy/ngx-mask/blob/develop/projects/ngx-mask-lib/src/lib/ngx-mask.service.ts#L526
The onChange is triggered when mask changed even if the triggerOnMaskChange is false.
The if (this.writingValue || (!this.triggerOnMaskChange && this.maskChanged)) should never trigger onChange. In the case in latest versions the function always call onChange if this.maskChanged is true.
If this is a wanted behaviour we need a configuration variable to choose if we want the onChange triggered when maskChanged.
🌍 Your Environment
Angular Version:
The text was updated successfully, but these errors were encountered: