You have to use your own method to determine if a field has a changed value on a field level.
To be able to check in FieldMetaProps whether or not the field's value has been altered.
Do a comparison on field level to check whether or not the field is dirty/pristine. Perhaps the same method as in the comparison at form level can be used which calculates that dirty value.
Everyone who wants to check whether or not a field still has the original value.
I am using a comparison on field level in my components:
if (touched && JSON.stringify(value) !== JSON.stringify(initialValue)) {
// this field is dirty
}
// Or better yet instead of JSON.stringify use an object-diff library for this comparison.
// Formik uses isEqual from react-fast-compare
Relates to #1364 #1421
+1 will add to v3.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 60 days
Any update on when is this going to be available?
Most helpful comment
+1 will add to v3.