Skip to main content
Version: 57.2.0

Custom Select Field

Displays a list of options using the browser’s native select and includes a custom option that renders a text field when selected and allows user to input value not included in predefined options.

Package: @terreno/ui
Categories: Component
Props interface: CustomSelectFieldProps
Story source: demo/stories/CustomSelectField.stories.tsx

Live demo

Props

PropTypeRequiredDescription
onChangereflectionYesThe function to call when the custom select field value changes.
optionsarrayYesThe options available for selection in the select field. Each option should have a label and a value.
valueunionYesThe current value of the custom select field.
disabledbooleanIf true, the select field will be disabled.
disableSearchbooleanWhen true, hides the type-to-filter search UI. Search is enabled by default.
errorTextstringThe error text to display if there is an error.
helperTextstringThe helper text to display below the select field.
placeholderstringThe placeholder text to display when no option is selected.
testIDstringRoot test id for the primary interactive element or container.
testIDsFieldTestIDs
titlestringThe title of the custom select field.