Replies: 1 comment 1 reply
-
I'm not totally sure I understand what you're trying to do, but can you use useEffect? userEffect(() => { do what you need to do}, [props.values.dateChoice]) OR have you looked at setFieldTouched? This issue might help. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've got two radio inputs inside a custom "date picket" component, which is a child of a Formik component.
The chooser has two radios for selecting dates. I need to switch between some
Date
objects when these radio values change. However, I cannot figure out a way to listen to the changes.Using
onChange
works but breaks Formik, it longer reads the value changes when I interact with the radios.If I try to get the field using a context, it fires multiple times and gives me both values, like something is broken. I assume this is not the right approach in this scenario.
Here is the RadioInput component:
Beta Was this translation helpful? Give feedback.
All reactions