SelectInputcomponent

SelectInput(props: SelectProps<T>): ReactElement
ParamType
propsSelectProps<T>
Props for SelectInput, a dropdown <select> bound to a string value. required
    .optionsChoiceOptions<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} />