You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have never worked with Formik before and was trying to implement a dependent field use case.
I have been following the example above but the issue I am having is that everything works where I have the ability to then edit the field that relies on the name and an id fields but once I go to submit my form, that is where I run into issues. I should mention this form already has data in it. It is an update action with pre-populated data in it. Once I hit submit, It resets the form back to what the setFieldValue URL is in the useEffect even if I have previously changed it but didn't touch the name or id fields at all.
It seems to be touching the fields upon submission. Any guidance would be greatly appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Dependent Field Formik EX
I have never worked with Formik before and was trying to implement a dependent field use case.
I have been following the example above but the issue I am having is that everything works where I have the ability to then edit the field that relies on the
name
and anid
fields but once I go to submit my form, that is where I run into issues. I should mention this form already has data in it. It is an update action with pre-populated data in it. Once I hit submit, It resets the form back to what thesetFieldValue
URL is in theuseEffect
even if I have previously changed it but didn't touch thename
orid
fields at all.It seems to be touching the fields upon submission. Any guidance would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions