Yes, the previous version in which this bug was not present was: 16.2.4
### Description
The onChange is triggered when [mask] updating after init. Input becomes dirty when maskChanged.
## 🔬 Minimal Reproduction
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.4 ### Description The onChange is triggered when [mask] updating after init. Input becomes dirty when maskChanged. ## 🔬 Minimal Reproductionhttps://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: