react-gears
react-gears copied to clipboard
<FormRow type="checkbox" /> does not work with multiple selections
Using FormRow type="checkbox" does not work with multiple selections. The onChange will only return a value when checked, but returns empty array when unchecked, which makes it impossible to determine what was deselected.
@gthomas-appfolio Can you post the steps to reproduce? Thanks
Sure, if you use the FormRow+FormChoice such as this example from Forms>Forms with Objects:
<FormRow type="checkbox" label="Select the character(s) you like" onChange={...}>
<FormChoice>Darth Vader</FormChoice>
<FormChoice>Luke Skywalker</FormChoice>
<FormChoice disabled>Emperor Palpatine</FormChoice>
<FormChoice>Rey</FormChoice>
<FormChoice>TK-421</FormChoice>
</FormRow>
onChange is unusable to control an array of selections, it seems impossible to determine if you have unchecked some choices.