Skip to content

SelectInput

Dropdown selection from a list of choices. Supports dynamic loading via ChoicesContext (e.g. inside ReferenceInput) or static choices prop.

<SelectInput source="gender" choices={[{ id: 'M', name: 'Male' }, { id: 'F', name: 'Female' }]} />
<ReferenceInput source="category_id" reference="categories">
<SelectInput optionText="title" />
</ReferenceInput>

Key props from ChoicesProps, InputProps, and component-specific options.

PropRequiredTypeDefaultDescription
sourceOptional*string-Field name (inferred in ReferenceInput)
choicesRequired (when not in ReferenceInput)any[]-Available options
optionTextOptionalstring | function | ReactElementname or record reprHow to render each option
optionValueOptionalstringidValue extractor field
disableValueOptionalstringdisabledProperty marking a disabled choice
translateChoiceOptionalboolean!isFromReferenceTranslate option text
emptyTextOptionalstring | ReactElement""Placeholder display
emptyValueOptionalany""Value used for empty selection
createOptionalboolean-Enable create new suggestion flow
createLabelOptionalstring-Translation key for create item
onCreateOptional(value:string)=>void-Async create handler
helperTextOptionalReactNode-Help text
classNameOptionalstring-Classes

* Provide source unless inside a ReferenceInput.

When create or onCreate is set, an extra pseudo-choice is appended and handled by useSupportCreateSuggestion.

Displays an inline reset icon (X) when a value is selected; clicking resets to emptyValue.