Closed quantizor closed 1 year ago
Anyways of fixing this.Can we have a work around for Onchange ?
have you considered "touched" state, I think the logic that if initialValues = currentValues then isDirty =true is correct
https://formik.org/docs/api/formik#touched--field-string-boolean-
have you considered "touched" state, I think the logic that if initialValues = currentValues then isDirty =true is correct
https://formik.org/docs/api/formik#touched--field-string-boolean-
Hmm, you might be right. As long as it resets with enableReinitialize
that would work.
At the moment
dirty
is a memoized field that compares the current values to the initial values. The thing is if someone ticks a checkbox and then unticks it, the form is still dirty but the dirty flag would reset tofalse
because the values now match again.