ChoiceRadioInputscomponent
ChoiceRadioInputs(props: ChoiceRadioInputsProps<T>): ReactElement
| Param | Type | |
|---|---|---|
props | ChoiceRadioInputsProps<T> | Props for ChoiceRadioInputs, which renders a radio for each entry in a ChoiceOptions set. required |
.options | ChoiceOptions<T> | Options for the radios. required |
.wrap | boolean | Wrap the radios onto multiple rows if needed. |
.column | boolean | Display the radios in a column rather than a row. |
| Return | |
|---|---|
ReactElement | Element rendering one radio per option plus an optional empty placeholder radio. |
Output a list of <RadioInput> elements for each item in a set of ChoiceOptions in { key: title } format.
- This is the same type a
ChoiceSchemauses for its.optionsfield. - A
placeholderoption is shown at the bottom ifrequired=false.
Examples
<ChoiceRadioInputs name="role" options={{ admin: "Admin", user: "User" }} value={role} onValue={setRole} />