CheckboxChoicesWidgetThis is a React component
SourceThis is a React component
import { CheckboxChoicesWidget } from "@prestojs/ui-antd";
CheckboxChoicesWidget(props)
Render choices as a group of checkboxes.
See Checkbox.Group for extra props available
To pass props through to the individual Checkbox
use choiceProps
.
Parameter | Type | Description | |
---|---|---|---|
props.choiceProps | Map | Any additional props to pass through to each choice. These are passed through to the Should be a | |
props.choices | Map|[ValueT, string][] | The choices to render. This can be a |
Examples
Basic Usage
Any extra props are passed through to Radio.Group.
Choices are rendered as:
<Checkbox.Group><Radio key="1" value="1">One</Radio><Radio key="2" value="2">Two</Radio></Checkbox.Group>
You can customise the component used instead of Radio
by passing radioComponent
(eg. radioComponent={RadioChoicesWidget.Button}
).
You can pass any extra props to each Radio
by passing choiceProps
which is a Map
of choice value to the props to apply.