HTML ID of an element that should be used as the label (for assistive tech)
Focus the control when it is mounted
Remove the currently focused option when the user presses backspace
Remove focus from the input when the user selects an option (handy for dismissing the keyboard on touch devices)
When the user reaches the top/bottom of the menu, prevent scroll on the scroll-parent
className attribute applied to the outer component
classNamePrefix attribute used as a base for inner component classNames
If true
, close the select menu when the user scrolls the document/body.
If a function, takes a standard javascript ScrollEvent
you return a boolean:
true
=> The menu closes
false
=> The menu stays open
This is useful when you have a scrollable modal and want to portal the menu out, but want to avoid graphical issues.
Close the select menu when the user selects an option
This complex object includes all the compositional components that are used
in react-select
. If you wish to overwrite a component, pass in an object
with the appropriate namespace.
If you only wish to restyle a component, we recommend using the styles
prop
instead. For a list of the components that can be passed in, and the shape
that will be passed to them, see the components docs
Whether the value of the select, e.g. SingleValue, should be displayed in the control.
Delimiter used to join multiple values into a single HTML Input value
Clear all values when the user presses escape AND the menu is closed
Custom method to filter whether an option should be displayed in the menu
Formats group labels in the menu as React components
Formats option labels in the menu and control as React components
Resolves option data to a string to be displayed as the label by components
Resolves option data to a string to compare options and specify value attributes
Hide the selected option from the menu
The id to set on the SelectContainer component.
The id of the search input
The value of the search input
Define an id prefix for the select components e.g. {your-id}-value
Is the select value clearable
Is the select disabled
Is the select in a state of loading (async)
Support multiple selected options
Override the built-in logic to detect whether an option is disabled
Override the built-in logic to detect whether an option is selected
Is the select direction right-to-left
Whether to enable search functionality
Async: Text to display when loading options
Maximum height of the menu before scrolling
Whether the menu is open
Default placement of the menu in relation to the control. 'auto' will flip when there isn't enough space below the control.
Whether the menu should use a portal, and where it should attach
The CSS position value of the menu, when "fixed" extra layout management is required
Whether to block scroll events when the menu is open
Whether the menu should be scrolled into view when it opens
Minimum height of the menu before flipping
Name of the HTML Input (optional - without this, no input will be rendered)
Text to display when there are no options
Handle blur events on the control
Handle change events on the select
Handle focus events on the control
Handle change events on the input
Handle key down events on the select
Handle the menu closing
Handle the menu opening
Fired when the user scrolls to the bottom of the menu
Fired when the user scrolls to the top of the menu
Allows control of whether the menu is opened when the Select is clicked
Allows control of whether the menu is opened when the Select is focused
Array of options that populate the select menu
Number of options to jump in menu when page{up|down} keys are used
Placeholder text for the select value
Status to relay to screen readers
Style modifier methods
Sets the tabIndex attribute on the input
Select the currently focused option when the user presses tab
Theme modifier method
The value of the select; reflected by the selected option
Generated using TypeDoc
Aria label (for assistive tech)