New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Angular model starts as "dirty" #136
Comments
@ryanbuening thanks again for deep explanation. I can't belive, but with your help It seems that it was already done in angular-plugin v4.0.0 or i am not able to recognize the difference. May be |
@uNmAnNeR imask is great. I'm glad I can help in any way. Let me know if you would like me to create a repo or research this issue further. Thanks. |
@ryanbuening I did some research. What's done in May be you know better way? Is it possible to hook form initialization in Angular? or somehow else to know is it init step or any other application action? |
relates angular/angular#14988 |
we can't do it like |
The Angular hook order is outlined here: https://angular.io/guide/lifecycle-hooks#peek-a-boo-all-hooks. Not sure if it's possibly to detect if the view was initialized completely from any of those? |
yes, the last step of initialization is One more point is that Or may be any other ideas? |
I don't have any better ideas currently. I was looking around at the other masking libraries for Angular. ngx-mask had a similar issue as well. I found a couple commits related to the issue. Not sure if any of these are helpful?: |
@ryanbuening Happy New Year without bugs! :) |
@uNmAnNeR Great! Thanks for the fix 👍 |
Hi @uNmAnNeR, we have similar issue with react final-form. Input fields using masks starts as "dirty". Is there anything that we need to do on our side to fix this behaviour? Thanks |
In Angular you can check the state of the form; if a control as been touched for example. When using imask, the
dirty
property of the form is automatically set totrue
. The expectation is that the form'sdirty
property should befalse
until the user changes an input value.text-mask had a similar issue and apparently solved it with this commit. Was wondering if something similar could be done in imask?
The text was updated successfully, but these errors were encountered: