I have a requirement to include a checkbox list field on a form--one field with N number of checkboxes. The value of the "field" would be a comma-delimited list of the checked values. The field can optionally be required, too, meaning at least one of the N checkboxes must be checked before the field is considered valid. For example:
There isn't a CheckboxGroup equivalent to the RadioGroup (though people have asked about it). And the RadioGroup component doesn't seem to have a "checkbox mode."
Is there a decent way to build a checkbox list field using KendoReact? If so, how? I've toyed with the following options:
- Using an array map function within the form to render a series of <Field ... component={Checkbox} /> instances.
- This works, but validation is a challenge since each Field has its own validation message rather than the collective field having a singular validation message.
- Building a custom field, <Field ... component={MyCheckboxList} />, where MyCheckboxList includes several Checkbox components. This is based on the Custom Components documentation. This seems incorrect since <Field /> is meant to hold one and only one form input field not several.
I'd prefer not to hand-roll a checkbox list field without using KendoReact. I can't be the first KendoReact user to need a checkbox list on a form...right? 😀