CreatableSelectProps
Properties
Allow options to be created while the isLoading
prop is true. Useful to prevent the "create new ..." option being displayed while async results are still being loaded.
Remove the currently focused option when the user presses backspace when Select isClearable or isMulti
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
If provided, all inner components will be given a prefixed className attribute.
If true
, close the select menu when the user scrolls the document/body.
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.
Whether the value of the select, e.g. SingleValue, should be displayed in the control.
Sets the position of the createOption element in your options list. Defaults to 'last'
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
Gets the label for the "create new ..." option in the menu. Is given the current input value.
Formats group labels in the menu as React components
Formats option labels in the menu and control as React components
Returns the data for the new option when it is created. Used to display the value, and is passed to onChange
.
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 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
Override the built-in logic to detect whether an option is disabled
Override the built-in logic to detect whether an option is selected
Whether to enable search functionality
Determines whether the "create new ..." option should be displayed based on the current input value, select value and options array.
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
Text to display when there are no options
Handle blur events on the control
Handle change events on the select
If provided, this will be called with the input value when a new option is created, and onChange
will not be called. Use this when you need more control over what happens when new options are created.
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
Placeholder for the select value
Status to relay to screen readers
Style modifier methods
Select the currently focused option when the user presses tab
Theme modifier method
The value of the select reflected by the selected option