Reputation: 83
Previously, I asked for help with getting radio buttons to work with Material UI and Formik here: Cannot get Material UI radio buttons to work with Formik. Luckily, I got a fix for it, but unfortunately it did not work for our application. Therefore, I have developed a code sandbox that more closely matches our environment, with the solution that was given in the previous question. Can anyone give advice on how to get it to work? For more details, we wrap Material UI, in this case the Radio.js class. This allows us to leverage it in different projects/repos. Here is the code sandbox: https://codesandbox.io/s/recursing-colden-0oo63. Thanks!
Upvotes: 0
Views: 1969
Reputation: 83
With some help, I found this answer works. https://codesandbox.io/s/sleepy-tdd-784y8
Upvotes: 1
Reputation: 3621
Do you mean radio button did not go to checked state? You did not work and set the Checked Prop. You have to use state hooks and onChange event.
See example: https://codesandbox.io/s/festive-firefly-lb45t
Upvotes: 0