SelectInputcomponent
SelectInput(props: SelectProps<T>): ReactElement
| Param | Type | |
|---|---|---|
props | SelectProps<T> | Props for SelectInput, a dropdown <select> bound to a string value. required |
.options | ChoiceOptions<T> | The options for the select. required |
| Return | |
|---|---|
ReactElement | A <select> element. |
Dropdown input bound to a string value, rendered as a <select> of the provided options.
- Shows a placeholder empty option unless the field is required and already has a value.
Examples
<SelectInput name="role" options={ROLES} value={role} onValue={setRole} />