Remove the deletion of a property in `setIn` with undefined value #3474
Remove the deletion of a property in setIn with undefined value.
I don't see any reason to delete the property. This can cause problems #3474 .
closes #3474
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.
formik-docs – ./
🔍 Inspect: https://vercel.com/jared/formik-docs/3wXmvQNLaM2JocDT2KZinTUCM8G8
✅ Preview: Failed
Would love to see an update on this bug. Its been a known issue for 2 years now https://github.com/jaredpalmer/formik/issues/2332
It will not work just to delete this lines, because setIn function is used to change formik.errors and formik.touched states (beside formik.values state), and it is required to actually remove undefined values from this states (e.g. see this bug for more info)
Need to somehow distinguish when undefined values should be removed, and when should not.
I see. I can add optional parameter to the setIn function like shouldRemoveUndefined.
I am deleting pr because it is not complete