An select-like field with optional search capability.
Properties
inline true|false
- Whether to display the options inline or via a drop down. The default is
false
. multiple true|false
- Whether to allow multiple options to be selected. The default is
false
. onChange {function ({target: , option: , value: })}
- Function that will be called when the user selects an option. The
target
corresponds to the embedded input element, allowing you to distinguish which component triggered the event. Theoption
contains the object chosen from the supplied options. Thevalue
contains all selected options whenmultiple={true}
. onSearch {function (event)}
- Function that will be called when the user types in the search input. If this property is not provided, no search field will be rendered.
options [{value: , label: }|{string}, ...]
- Options can be either a string or an object. The
label
property of option objects can be a string or a React element. This allows rendering richer option representations. placeHolder {string}
- Placeholder text to use when the search input is empty.
value {value: , label: }|{string}
- What text to put in the input.