Missing props.onReset
dependency in useCallback of resetForm function.
#3861
Labels
props.onReset
dependency in useCallback of resetForm function.
#3861
Bug report
Current Behavior
If we have alternative thing to reset like search and filter, so suppose i have a object which have search and filter key and at first the i searched something and then i do filter and now after filter i reset the search value and then i reset the filter then the automatically the previous searched value comes in search and again i have to press on reset search button to clear it.
Expected behavior
I am expecting that after clicking the resetFilter button the search should not take the previously searched value.
Suggested solution(s)
In the resetForm function the useCallback should have dependency
props.onReset
.Additional context
Reference line: https://github.com/jaredpalmer/formik/blob/main/packages/formik/src/Formik.tsx#L420
Your environment
The text was updated successfully, but these errors were encountered: