react-final-form icon indicating copy to clipboard operation
react-final-form copied to clipboard

Radio buttons not functioning correctly inside a Wizard.Page

Open Cerzi opened this issue 5 years ago • 3 comments

See this small sandbox example: https://codesandbox.io/s/cold-wave-jon76?file=/index.js

The basic radio button "stooge" example works as you'd expect, but the three radio buttons generated using an object liist and .map call do not graphically show they have been selected - although they still save their data to the FormValues

Changing the Field's value from value={option.value} to value="some static value" fixes the problem, but obviously breaks the purposes of using a generated field.

Cerzi avatar Aug 17 '20 15:08 Cerzi

Weirdly the issue goes away simply by using value={"" + option.value}

Cerzi avatar Aug 18 '20 10:08 Cerzi

Hello @Cerzi, wathing your example I mentioned that attr "checked" in html also work incorrectly! When the form is rendered by from scratch first element has that attr, but when I chose the second one, "checked" attr doesn't change its position - first element still has it and the second has not. Should I create new bug report for that or I can leave it here ? image

postal286 avatar Jun 17 '22 13:06 postal286

It doesn't seem to be related to the library, html works that way just to set initial checked radio, sorry for interrupting :)

postal286 avatar Jun 17 '22 13:06 postal286