Open DerStimmler opened 2 years ago
I'm pretty sure the problem lies in this if statement:
The focusText
variable doesn't get updated properly and always contains the initial value. So when you change the input the first part of the statement will always be true. Therefore the change event gets triggered in the if statement body.
To fix the issue you could maybe just remove that part and only keep the second part of the if statement. Or you have to update the variable properly.
Hi,
So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you reopen the issue so we can include it in our roadmap? Please don't forget to add your feedback as a comment after reopening the issue. These will be taken into account by us and will contribute to the development of this feature. Thanks a lot for your understanding!
Best Regards,
Hi, this issue is still present in version 14.2.1. Here is a new example: https://stackblitz.com/edit/github-ejhueh?file=src/app/app.component.html https://github-ejhueh.stackblitz.io
@mertsincan I can't reopen the issue since I'm not a collaborator of this repo and haven't closed the issue by myself.
Just stumbled upon this issue while developing.
"primeng": "16.0.2"
Is this going to be fixed some day?
Unfortunately still seeing this issue in PrimeNG 17.18.10.
I'm submitting a ...
Plunkr Case (Bug Reports)
https://stackblitz.com/edit/github-6hugjj?file=src/app/app.component.html https://github-6hugjj.stackblitz.io
The console prints all value changes. Just type some letters and then blur the control. You can see that the last value gets printed two times.
Current behavior When blurring the input mask a change event gets fired although the value doesn't change.
Expected behavior The change event gets only fired when the value actually changes.
Minimal reproduction of the problem with instructions Use the stackblitz example above.
Or create a input-mask control via form builder and subscribe to the valueChanges observable on the form group.
What is the motivation / use case for changing the behavior? It should work properly.
Please tell us about your environment: Windows, Rider, yarn, Angular 13, PrimeNg 13.3.3
Angular version: 13.X
PrimeNG version: 13.3.3
Browser: At least Chrome and Edge
Language: Typescript 4.6.3
Node (for AoT issues):
node --version
= 14.18.3