final-form / final-form/react-final-form
6.3.2 vs 6.3.0 breaks radio selection via format prop
- Dominant language
- JavaScript
- Stars
- 7.4k
- Forks
- 497
- PR merge metrics
- No merged PRs in 30d
Description
**bug report**
### What is the current behavior?
Radios are setup with "Yes"/"No" values on input but store in FF as true/false boolean using parse/format (see sandbox examples). Clicking the radios applies true/false correctly to FF form state but the actual html inputs are not getting selected since some change that occurred between react-final-form 6.3.0 and 6.3.2.
To clarify the same code (see sandboxes below) works in 6.3.0 triggering clicked state on radios while 6.3.2+ does not. This occurs both when `` generates the input element and when we use a custom component (Reactstrap) in a current project.
### What is the expected behavior?
If format function makes true become"Yes" and false become "No" then radios with those matching value props should be selected.
This parse/format pairing technique works in similar fashion with select options parsing strings into numbers and vice verse regardless of react-final-form version so this issue appears to be specific to radios and perhaps the use of more than one `` or input?
### Sandbox Link
Example working with 6.3.0.
Click the radios and you will see form state storing as true/false and correct Yes/No value radio is shown as selected.
https://codesandbox.io/s/react-final-form-parseformat-issue-example-630-works-ighj4?fontsize=14&hidenavigation=1&theme=dark
Example of same code is not working with 6.3.3
Click the radios and while the correct parsed value is being stored in the state the radios themselves no longer are getting checked.
https://codesandbox.io/s/react-final-form-parseformat-issue-example-633-not-working-qezez?fontsize=14&hidenavigation=1&theme=dark


### What's your environment?
See above sandboxes.
Contributor guide
Assessment
This issue has not been assessed yet.