We can detect when a value is updated with the status dirty or untouched, but after that we can't know what the value was when it was pristine or when last marked as pristine.
So i suggest to give the possibility to expose in the controller both the actual value and the last pristine value.
this can be a generalization of [https://github.com//pull/442] #442
because with that reset feature you can reset to the value the form was constructed, but in some situation the form is prepared after the construction manually updating some default values. In such case markingAsPristine could cache the values of the form so that it can be:
- reset to last pristine values
- compare each actual value with its last pristine value
We can detect when a value is updated with the status dirty or untouched, but after that we can't know what the value was when it was pristine or when last marked as pristine.
So i suggest to give the possibility to expose in the controller both the actual value and the last pristine value.
this can be a generalization of [https://github.com//pull/442] #442
because with that reset feature you can reset to the value the form was constructed, but in some situation the form is prepared after the construction manually updating some default values. In such case markingAsPristine could cache the values of the form so that it can be: