Environment
Package version:
reactive_forms: ^18.2.0
Content
Hi, I noticed that when I change any field in a form, its state becomes dirty as expected. But even if I type the value back to the original default value, the form still reports dirty = true.
Is this expected behavior?
It seems like the dirty state only checks whether the field was ever modified, not whether the current value matches the initial value. Is there a built-in way to track “dirty” based on comparing the current value with the default/initial value instead of just a boolean flip?
If not, what is the recommended way to implement this?
Thanks!
Environment
Package version:
reactive_forms: ^18.2.0
Content
Hi, I noticed that when I change any field in a form, its state becomes
dirtyas expected. But even if I type the value back to the original default value, the form still reportsdirty = true.Is this expected behavior?
It seems like the
dirtystate only checks whether the field was ever modified, not whether the current value matches the initial value. Is there a built-in way to track “dirty” based on comparing the current value with the default/initial value instead of just a boolean flip?If not, what is the recommended way to implement this?
Thanks!