Homecomponentsinput
MultiSelect
A text field that allows searching from a large collection of options.
Alpha
This component is in development. There could be breaking changes made to it in a non-major release of Prism. Please use with caution.Overview
Create a text input that aids in filtering and selecting multiple items from a
list of options. It also supports most of the features of the TextField
.
Here's an example of a simple MultiSelect
.
Empty State
Use emptyState
property to show when there are no options available.
Disabled
Use disabled
property to prevent any interaction with the MultiSelect.
Highlight search matches
Use highlightMatches
property to highlight found matches in MultiSelect
dropdown.
API
onQueryChange
Required
(value: string) => void
value
Required
MultiSelectOption[]
onChange
Required
(value: MultiSelectOption[]) => void
options
Required
MultiSelectOption[]
emptyState
Required
string
name
Required
string
query
string
highlightMatches
true
false
disabled
true
false
label
string
id
string
tip
string
secondaryLabel
ReactNode
description
string
errorMessage
string
textAlign
center
end
start
size
small
regular
data
DataAttributeMap
placeholder
string
onBlur
FocusEventHandler<HTMLInputElement>
onKeyDown
KeyboardEventHandler<HTMLInputElement>
required
true
false
maxLength
number
ref
Ref<HTMLInputElement>
key
Key | null