You'll see these in the public props below:
type OptionType = { [string]: any }
type OptionsType = Array<OptionType>
type GroupType = {
[string]: any, // group label
options: OptionsType,
}
type ValueType = OptionType | OptionsType | null | void
type CommonProps = {
clearValue: () => void,
getStyles: (string, any) => {},
getValue: () => ValueType,
hasValue: boolean,
isMulti: boolean,
options: OptionsType,
selectOption: OptionType => void,
selectProps: any,
setValue: (ValueType, ActionTypes) => void,
emotion: any,
}
// passed as the second argument to `onChange`
type ActionTypes = | 'clear' | 'create-option' | 'deselect-option' | 'pop-value' | 'remove-value' | 'select-option' | 'set-value'
Even when commonProps are not listed in the prop types below, a custom component will still have access to them.
The statemanager is a utility class that wraps around the base Select and each Select variant to expose inputValue and value as controllable props. For more detailed information on these props and their usage please see the controlled props section of the advanced page.
defaultInputValue string = ""defaultMenuIsOpen boolean = falsedefaultValue union = nullOne of <Object, Array<Object>, null, undefined>inputValue stringmenuIsOpen booleanvalue unionOne of <Object, Array<Object>, null, undefined>onChange functionfunction (One of <Object, Array<Object>, null, undefined>, {action required One of <"select-option", "deselect-option", "remove-value", "pop-value", "set-value", "clear", "create-option">}) => undefinedThese base props are those available to be passed to all select variants.
"aria-label" stringAria label (for assistive tech)
"aria-labelledby" stringHTML ID of an element that should be used as the label (for assistive tech)
autoFocus booleanFocus the control when it is mounted
backspaceRemovesValue boolean = trueRemove the currently focused option when the user presses backspace
blurInputOnSelect boolean = isTouchCapable()Remove focus from the input when the user selects an option (handy for dismissing the keyboard on touch devices)
captureMenuScroll boolean = !isTouchCapable()When the user reaches the top/bottom of the menu, prevent scroll on the scroll-parent
className stringSets a className attribute on the outer component
classNamePrefix unionIf provided, all inner components will be given a prefixed className attribute.
This is useful when styling via CSS classes instead of the Styles API approach.
One of <string, null>closeMenuOnSelect boolean = trueClose the select menu when the user selects an option
closeMenuOnScroll union = falseIf 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.
One of <boolean, EventListener>components All Components Object = {}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
controlShouldRenderValue boolean = trueWhether the value of the select, e.g. SingleValue, should be displayed in the control.
delimiter stringDelimiter used to join multiple values into a single HTML Input value
escapeClearsValue boolean = falseClear all values when the user presses escape AND the menu is closed
filterOption union = createFilter()Custom method to filter whether an option should be displayed in the menu
One of <function ({label string required value string required data required Object}, string) => boolean, null>formatGroupLabel typeof formatGroupLabel = (group) => stringFormats group labels in the menu as React components
An example can be found in the Replacing builtins documentation.
(group) => stringformatOptionLabel functionFormats option labels in the menu and control as React components
function (Object, {context required One of <"menu", "value">inputValue string required selectValue required One of <Object, Array<Object>, null, undefined>}) => react.NodegetOptionLabel typeof getOptionLabel = (option) => stringResolves option data to a string to be displayed as the label by components
(option) => stringgetOptionValue typeof getOptionValue = (option) => stringResolves option data to a string to compare options and specify value attributes
(option) => stringhideSelectedOptions booleanHide the selected option from the menu
id stringThe id to set on the SelectContainer component.
inputValue stringThe value of the search input
inputId stringThe id of the search input
instanceId unionDefine an id prefix for the select components e.g. {your-id}-value
One of <number, string>isClearable booleanIs the select value clearable
isDisabled boolean = falseIs the select disabled
isLoading boolean = falseIs the select in a state of loading (async)
isOptionDisabled function = (option) => booleanOverride the built-in logic to detect whether an option is disabled
An example can be found in the Replacing builtins documentation.
function (Object, Array<Object>) => One of <boolean, false>isOptionSelected functionOverride the built-in logic to detect whether an option is selected
function (Object, Array<Object>) => booleanisMulti boolean = falseSupport multiple selected options
isRtl boolean = falseIs the select direction right-to-left
isSearchable boolean = trueWhether to enable search functionality
loadingMessage function = () => undefinedAsync: Text to display when loading options
({inputValue string required }) => One of <string, null>minMenuHeight number = 140Minimum height of the menu before flipping
maxMenuHeight number = 300Maximum height of the menu before scrolling
menuIsOpen boolean = falseWhether the menu is open
menuPlacement union = "bottom"Default placement of the menu in relation to the control. 'auto' will flip when there isn't enough space below the control.
One of <"auto", "bottom", "top">menuPosition union = "absolute"The CSS position value of the menu, when "fixed" extra layout management is required
One of <"absolute", "fixed">menuPortalTarget HTMLElementWhether the menu should use a portal, and where it should attach
An example can be found in the Portaling documentation
HTMLElementmenuShouldBlockScroll boolean = falseWhether to block scroll events when the menu is open
menuShouldScrollIntoView boolean = !isMobileDevice()Whether the menu should be scrolled into view when it opens
name stringName of the HTML Input (optional - without this, no input will be rendered)
noOptionsMessage function = () => undefinedText to display when there are no options
({inputValue string required }) => One of <react.Node, null>onBlur functionHandle blur events on the control
(SyntheticFocusEvent<HTMLElement>) => undefinedonChange functionHandle change events on the select
function (One of <Object, Array<Object>, null, undefined>, {action required One of <"select-option", "deselect-option", "remove-value", "pop-value", "set-value", "clear", "create-option">}) => undefinedonFocus functionHandle focus events on the control
(SyntheticFocusEvent<HTMLElement>) => undefinedonInputChange functionHandle change events on the input
function (string, {action required One of <"set-value", "input-change", "input-blur", "menu-close">}) => undefinedonKeyDown functionHandle key down events on the select
(SyntheticKeyboardEvent<HTMLElement>) => undefinedonMenuOpen functionHandle the menu opening
() => undefinedonMenuClose functionHandle the menu closing
() => undefinedonMenuScrollToTop functionFired when the user scrolls to the top of the menu
(SyntheticEvent<HTMLElement>) => undefinedonMenuScrollToBottom functionFired when the user scrolls to the bottom of the menu
(SyntheticEvent<HTMLElement>) => undefinedopenMenuOnFocus boolean = falseAllows control of whether the menu is opened when the Select is focused
openMenuOnClick boolean = trueAllows control of whether the menu is opened when the Select is clicked
options Array<object> = []Array of options that populate the select menu
Array<Object>pageSize number = 5Number of options to jump in menu when page{up|down} keys are used
placeholder import = "Select..."Placeholder for the select value
react.NodescreenReaderStatus function = ({ count }) => undefinedStatus to relay to screen readers
({count number required }) => stringstyles $Shape<object> = {}Style modifier methods
A basic example can be found at the bottom of the Replacing builtins documentation.
$Shape<{clearIndicator function (Object, Object) => Objectcontainer function (Object, Object) => Objectcontrol function (Object, Object) => ObjectdropdownIndicator function (Object, Object) => Objectgroup function (Object, Object) => ObjectgroupHeading function (Object, Object) => ObjectindicatorsContainer function (Object, Object) => ObjectindicatorSeparator function (Object, Object) => Objectinput function (Object, Object) => ObjectloadingIndicator function (Object, Object) => ObjectloadingMessage function (Object, Object) => Objectmenu function (Object, Object) => ObjectmenuList function (Object, Object) => ObjectmenuPortal function (Object, Object) => ObjectmultiValue function (Object, Object) => ObjectmultiValueLabel function (Object, Object) => ObjectmultiValueRemove function (Object, Object) => ObjectnoOptionsMessage function (Object, Object) => Objectoption function (Object, Object) => Objectplaceholder function (Object, Object) => ObjectsingleValue function (Object, Object) => ObjectvalueContainer required function (Object, Object) => Object}>theme unionTheme modifier method
One of <{borderRadius number required colors object required Objectspacing required {baseUnit number required controlHeight number required menuGutter number required }}, ({borderRadius number required colors object required Objectspacing required {baseUnit number required controlHeight number required menuGutter number required }}) => {borderRadius number required colors object required Objectspacing required {baseUnit number required controlHeight number required menuGutter number required }}>tabIndex string = "0"Sets the tabIndex attribute on the input
tabSelectsValue boolean = trueSelect the currently focused option when the user presses tab
value unionThe value of the select; reflected by the selected option
One of <Object, Array<Object>, null, undefined>form stringSets the form attribute on the input
These props are included with in both the Async and AsyncCreatable select. For more on using async selects, see the async select documentation
defaultOptions union = falseThe default set of options to show before the user starts searching. When
set to true, the results for loadOptions('') will be autoloaded.
One of <Array<Object>, boolean>cacheOptions any = falseIf cacheOptions is truthy, then the loaded data will be cached. The cache
will remain until cacheOptions changes value.
loadOptions functionFunction that returns a promise, which is the set of options to be used once the promise resolves.
function (string, (Array<Object>) => undefined) => One of <Promise<*>, undefined>onInputChange functionSame behaviour as for Select
function (string, {action required One of <"set-value", "input-change", "input-blur", "menu-close">}) => undefinedinputValue stringSame behaviour as for Select
isLoading boolean = falseWill cause the select to be displayed in the loading state, even if the Async select is not currently waiting for loadOptions to resolve
These props are included with in both the Creatable and AsyncCreatable select. For more on using creatable selects, see the creatable select documentation
allowCreateWhileLoading boolean = falseAllow 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.
createOptionPosition unionSets the position of the createOption element in your options list. Defaults to 'last'
One of <"first", "last">formatCreateLabel function = (inputValue) => undefinedGets the label for the "create new ..." option in the menu. Is given the current input value.
(string) => react.NodeisValidNewOption function = (inputValue, selectValue, selectOptions) => undefinedDetermines whether the "create new ..." option should be displayed based on the current input value, select value and options array.
function (string, Array<Object>, Array<Object>) => booleangetNewOptionData function = (inputValue, optionLabel) => undefinedReturns the data for the new option when it is created. Used to display the
value, and is passed to onChange.
function (string, react.Node) => ObjectonCreateOption functionIf 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.
(string) => undefinedcreateOptionPosition union = "last"Sets the position of the createOption element in your options list. Defaults to 'last'
One of <"first", "last">name stringName of the HTML Input (optional - without this, no input will be rendered)
options Array<object>Array<Object>inputValue stringvalue unionOne of <Object, Array<Object>, null, undefined>isLoading booleanisMulti booleanonChange functionfunction (One of <Object, Array<Object>, null, undefined>, {action required One of <"select-option", "deselect-option", "remove-value", "pop-value", "set-value", "clear", "create-option">}) => undefinedReact-Select allows you to augment layout and functionality by replacing
the default components with your own, using the components
property. These components are given all the current props and state
letting you achieve anything you dream up. For more information in replacing
components see the components documentation
Some components are passed an innerRef property to facilitate for internally managed behaviour within the base select. This should be assigned to the ref property of the relevant dom element. i.e.
const CustomOptionComponent = ({ innerProps, innerRef }) =>
(<div ref={innerRef} {...innerProps} />)
All functional properties that the component needs are provided in
innerProps which you must spread.
IMPORTANT NOTE The below props are provided automatically by react-select
when these components are passed into the components object above. Knowing
their API is most necessary if you intend to provide your own components, to
understand what information they will be handed.
clearValue function() => undefinedclassName stringcx functionfunction (One of <One of <Object, undefined>, undefined>, One of <string, undefined>) => One of <string, undefined>getStyles functionGet the styles of a particular part of the select. Pass in the name of the
property as the first argument, and the current props as the second argument.
See the styles object for the properties available.
(string, any) => Objecttheme object{borderRadius number required colors object required Objectspacing required {baseUnit number required controlHeight number required menuGutter number required }}getValue function() => One of <Object, Array<Object>, null, undefined>hasValue booleanisMulti booleanoptions Array<object>Array<Object>selectOption function(Object) => undefinedselectProps anysetValue functionfunction (One of <Object, Array<Object>, null, undefined>, One of <"select-option", "deselect-option", "remove-value", "pop-value", "set-value", "clear", "create-option">) => undefinedchildren importThe children to be rendered inside the indicator.
react.NodeinnerProps anyProps that will be passed on to the children.
isFocused booleanThe focused state of the select.
isRtl booleanWhether the text is right to left
clearValue function() => undefinedclassName stringcx functionfunction (One of <One of <Object, undefined>, undefined>, One of <string, undefined>) => One of <string, undefined>getStyles functionGet the styles of a particular part of the select. Pass in the name of the
property as the first argument, and the current props as the second argument.
See the styles object for the properties available.
(string, any) => Objecttheme object{borderRadius number required colors object required Objectspacing required {baseUnit number required controlHeight number required menuGutter number required }}getValue function() => One of <Object, Array<Object>, null, undefined>hasValue booleanisMulti booleanoptions Array<object>Array<Object>selectOption function(Object) => undefinedselectProps anysetValue functionfunction (One of <Object, Array<Object>, null, undefined>, One of <"select-option", "deselect-option", "remove-value", "pop-value", "set-value", "clear", "create-option">) => undefinedgetStyles functionGet the styles of a particular part of the select. Pass in the name of the
property as the first argument, and the current props as the second argument.
See the styles object for the properties available.
(string, any) => Objecttheme object{borderRadius number required colors object required Objectspacing required {baseUnit number required controlHeight number required menuGutter number required }}isDisabled booleanWhether the select is disabled.
isFocused booleanWhether the select is focused.
menuIsOpen booleanWhether the select is expanded.
children importChildren to render.
react.NodeinnerRef react.ElementRef<*>react.ElementRef<*>innerProps objectThe mouse down event and the innerRef to pass down to the controller element.
{onMouseDown function required (SyntheticMouseEvent<HTMLElement>) => undefined}clearValue function() => undefinedclassName stringcx functionfunction (One of <One of <Object, undefined>, undefined>, One of <string, undefined>) => One of <string, undefined>getStyles functionGet the styles of a particular part of the select. Pass in the name of the
property as the first argument, and the current props as the second argument.
See the styles object for the properties available.
(string, any) => Objecttheme object{borderRadius number required colors object required Objectspacing required {baseUnit number required controlHeight number required menuGutter number required }}getValue function() => One of <Object, Array<Object>, null, undefined>hasValue booleanisMulti booleanoptions Array<object>Array<Object>selectOption function(Object) => undefinedselectProps anysetValue functionfunction (One of <Object, Array<Object>, null, undefined>, One of <"select-option", "deselect-option", "remove-value", "pop-value", "set-value", "clear", "create-option">) => undefinedchildren importThe children to be rendered inside the indicator.
react.NodeinnerProps anyProps that will be passed on to the children.
isFocused booleanThe focused state of the select.
isRtl booleanWhether the text is right to left
clearValue function() => undefinedclassName stringcx functionfunction (One of <One of <Object, undefined>, undefined>, One of <string, undefined>) => One of <string, undefined>getStyles functionGet the styles of a particular part of the select. Pass in the name of the
property as the first argument, and the current props as the second argument.
See the styles object for the properties available.
(string, any) => Objecttheme object{borderRadius number required colors object required Objectspacing required {baseUnit number required controlHeight number required menuGutter number required }}getValue function() => One of <Object, Array<Object>, null, undefined>hasValue booleanisMulti booleanoptions Array<object>Array<Object>selectOption function(Object) => undefinedselectProps anysetValue functionfunction (One of <Object, Array<Object>, null, undefined>, One of <"select-option", "deselect-option", "remove-value", "pop-value", "set-value", "clear", "create-option">) => undefinedchildren importThe children to be rendered.
react.NodeHeading react.ComponentType<any>Component to wrap the label, recieves headingProps.
react.ComponentType<any>headingProps anyProps to pass to Heading.
label importLabel to be displayed in the heading component.
react.NodeGroup Heading can be any component.
clearValue function() => undefinedclassName stringcx functionfunction (One of <One of <Object, undefined>, undefined>, One of <string, undefined>) => One of <string, undefined>getStyles functionGet the styles of a particular part of the select. Pass in the name of the
property as the first argument, and the current props as the second argument.
See the styles object for the properties available.
(string, any) => Objecttheme object{borderRadius number required colors object required Objectspacing required {baseUnit number required controlHeight number required menuGutter number required }}getValue function() => One of <Object, Array<Object>, null, undefined>hasValue booleanisMulti booleanoptions Array<object>Array<Object>selectOption function(Object) => undefinedselectProps anysetValue functionfunction (One of <Object, Array<Object>, null, undefined>, One of <"select-option", "deselect-option", "remove-value", "pop-value", "set-value", "clear", "create-option">) => undefinedisRtl booleanWhether the text should be rendered right to left.
children importThe children to be rendered.
react.NodeclearValue function() => undefinedclassName stringcx functionfunction (One of <One of <Object, undefined>, undefined>, One of <string, undefined>) => One of <string, undefined>getStyles functionGet the styles of a particular part of the select. Pass in the name of the
property as the first argument, and the current props as the second argument.
See the styles object for the properties available.
(string, any) => Objecttheme object{borderRadius number required colors object required Objectspacing required {baseUnit number required controlHeight number required menuGutter number required }}getValue function() => One of <Object, Array<Object>, null, undefined>hasValue booleanisMulti booleanoptions Array<object>Array<Object>selectOption function(Object) => undefinedselectProps anysetValue functionfunction (One of <Object, Array<Object>, null, undefined>, One of <"select-option", "deselect-option", "remove-value", "pop-value", "set-value", "clear", "create-option">) => undefinedchildren importThe children to be rendered inside the indicator.
react.NodeinnerProps anyProps that will be passed on to the children.
isFocused booleanThe focused state of the select.
isRtl booleanWhether the text is right to left
getStyles functionGet the styles of a particular part of the select. Pass in the name of the
property as the first argument, and the current props as the second argument.
See the styles object for the properties available.
(string, any) => Objecttheme object{borderRadius number required colors object required Objectspacing required {baseUnit number required controlHeight number required menuGutter number required }}cx functionfunction (One of <Object, undefined>, string) => One of <string, undefined>innerRef functionReference to the internal element
(react.ElementRef<*>) => undefinedisHidden booleanSet whether the input should be visible. Does not affect input size.
isDisabled booleanWhether the input is disabled
className stringform stringThe ID of the form that the input belongs to
innerProps anyProps that will be passed on to the children.
isFocused booleanThe focused state of the select.
isRtl booleanWhether the text is right to left
clearValue function() => undefinedclassName stringcx functionfunction (One of <One of <Object, undefined>, undefined>, One of <string, undefined>) => One of <string, undefined>getStyles functionGet the styles of a particular part of the select. Pass in the name of the
property as the first argument, and the current props as the second argument.
See the styles object for the properties available.
(string, any) => Objecttheme object{borderRadius number required colors object required Objectspacing required {baseUnit number required controlHeight number required menuGutter number required }}getValue function() => One of <Object, Array<Object>, null, undefined>hasValue booleanisMulti booleanoptions Array<object>Array<Object>selectOption function(Object) => undefinedselectProps anysetValue functionfunction (One of <Object, Array<Object>, null, undefined>, One of <"select-option", "deselect-option", "remove-value", "pop-value", "set-value", "clear", "create-option">) => undefinedsize numberSet size of the container.
clearValue function() => undefinedclassName stringcx functionfunction (One of <One of <Object, undefined>, undefined>, One of <string, undefined>) => One of <string, undefined>getStyles functionGet the styles of a particular part of the select. Pass in the name of the
property as the first argument, and the current props as the second argument.
See the styles object for the properties available.
(string, any) => Objecttheme object{borderRadius number required colors object required Objectspacing required {baseUnit number required controlHeight number required menuGutter number required }}getValue function() => One of <Object, Array<Object>, null, undefined>hasValue booleanisMulti booleanoptions Array<object>Array<Object>selectOption function(Object) => undefinedselectProps anysetValue functionfunction (One of <Object, Array<Object>, null, undefined>, One of <"select-option", "deselect-option", "remove-value", "pop-value", "set-value", "clear", "create-option">) => undefinedgetPortalPlacement functionCallback to update the portal after possible flip.
({placement union required One of <"bottom", "top", null>maxHeight number required }) => undefinedinnerProps objectProps to be passed to the menu wrapper.
ObjectmaxMenuHeight numberSet the maximum height of the menu.
menuPlacement unionSet whether the menu should be at the top, at the bottom. The auto options sets it to bottom.
One of <"auto", "bottom", "top">menuPosition unionThe CSS position value of the menu, when "fixed" extra layout management is required
One of <"absolute", "fixed">minMenuHeight numberSet the minimum height of the menu.
menuShouldScrollIntoView booleanSet whether the page should scroll to show the menu.
innerRef react.ElementRef<*>Reference to the internal element, consumed by the MenuPlacer component
react.ElementRef<*>children react.Element<*>The children to be rendered.
react.Element<*>clearValue function() => undefinedclassName stringcx functionfunction (One of <One of <Object, undefined>, undefined>, One of <string, undefined>) => One of <string, undefined>getStyles functionGet the styles of a particular part of the select. Pass in the name of the
property as the first argument, and the current props as the second argument.
See the styles object for the properties available.
(string, any) => Objecttheme object{borderRadius number required colors object required Objectspacing required {baseUnit number required controlHeight number required menuGutter number required }}getValue function() => One of <Object, Array<Object>, null, undefined>hasValue booleanisMulti booleanoptions Array<object>Array<Object>selectOption function(Object) => undefinedselectProps anysetValue functionfunction (One of <Object, Array<Object>, null, undefined>, One of <"select-option", "deselect-option", "remove-value", "pop-value", "set-value", "clear", "create-option">) => undefinedchildren importThe children to be rendered.
react.NodeinnerRef react.Ref<*>Inner ref to DOM Node
react.Ref<*>isMulti booleanSet classname for isMulti
maxHeight numberSet the max height of the Menu component
clearValue function() => undefinedclassName stringcx functionfunction (One of <One of <Object, undefined>, undefined>, One of <string, undefined>) => One of <string, undefined>getStyles functionGet the styles of a particular part of the select. Pass in the name of the
property as the first argument, and the current props as the second argument.
See the styles object for the properties available.
(string, any) => Objecttheme object{borderRadius number required colors object required Objectspacing required {baseUnit number required controlHeight number required menuGutter number required }}getValue function() => One of <Object, Array<Object>, null, undefined>hasValue booleanisMulti booleanoptions Array<object>Array<Object>selectOption function(Object) => undefinedselectProps anysetValue functionfunction (One of <Object, Array<Object>, null, undefined>, One of <"select-option", "deselect-option", "remove-value", "pop-value", "set-value", "clear", "create-option">) => undefinedchildren importThe children to be rendered.
react.NodeinnerProps objectProps to be passed on to the wrapper.
ObjectclearValue function() => undefinedclassName stringcx functionfunction (One of <One of <Object, undefined>, undefined>, One of <string, undefined>) => One of <string, undefined>getStyles functionGet the styles of a particular part of the select. Pass in the name of the
property as the first argument, and the current props as the second argument.
See the styles object for the properties available.
(string, any) => Objecttheme object{borderRadius number required colors object required Objectspacing required {baseUnit number required controlHeight number required menuGutter number required }}getValue function() => One of <Object, Array<Object>, null, undefined>hasValue booleanisMulti booleanoptions Array<object>Array<Object>selectOption function(Object) => undefinedselectProps anysetValue functionfunction (One of <Object, Array<Object>, null, undefined>, One of <"select-option", "deselect-option", "remove-value", "pop-value", "set-value", "clear", "create-option">) => undefinedchildren importThe children to be rendered.
react.NodeinnerProps objectProps to be passed on to the wrapper.
ObjectclearValue function() => undefinedclassName stringcx functionfunction (One of <One of <Object, undefined>, undefined>, One of <string, undefined>) => One of <string, undefined>getStyles functionGet the styles of a particular part of the select. Pass in the name of the
property as the first argument, and the current props as the second argument.
See the styles object for the properties available.
(string, any) => Objecttheme object{borderRadius number required colors object required Objectspacing required {baseUnit number required controlHeight number required menuGutter number required }}getValue function() => One of <Object, Array<Object>, null, undefined>hasValue booleanisMulti booleanoptions Array<object>Array<Object>selectOption function(Object) => undefinedselectProps anysetValue functionfunction (One of <Object, Array<Object>, null, undefined>, One of <"select-option", "deselect-option", "remove-value", "pop-value", "set-value", "clear", "create-option">) => undefinedchildren importreact.Nodecomponents anycropWithEllipsis booleandata anyinnerProps anyisFocused booleanisDisabled booleanremoveProps object{onTouchEnd function required (any) => undefinedonClick function required (any) => undefinedonMouseDown function required (any) => undefined}children importreact.Nodedata anyinnerProps object{className string }selectProps anychildren importreact.Nodedata anyinnerProps object{className string }selectProps anychildren importreact.Nodedata anyinnerProps object{className string }selectProps anygetStyles functionGet the styles of a particular part of the select. Pass in the name of the
property as the first argument, and the current props as the second argument.
See the styles object for the properties available.
(string, any) => Objecttheme object{borderRadius number required colors object required Objectspacing required {baseUnit number required controlHeight number required menuGutter number required }}clearValue function() => undefinedclassName stringcx functionfunction (One of <One of <Object, undefined>, undefined>, One of <string, undefined>) => One of <string, undefined>getStyles functionGet the styles of a particular part of the select. Pass in the name of the
property as the first argument, and the current props as the second argument.
See the styles object for the properties available.
(string, any) => Objecttheme object{borderRadius number required colors object required Objectspacing required {baseUnit number required controlHeight number required menuGutter number required }}getValue function() => One of <Object, Array<Object>, null, undefined>hasValue booleanisMulti booleanoptions Array<object>Array<Object>selectOption function(Object) => undefinedselectProps anysetValue functionfunction (One of <Object, Array<Object>, null, undefined>, One of <"select-option", "deselect-option", "remove-value", "pop-value", "set-value", "clear", "create-option">) => undefinedisDisabled booleanWhether the option is disabled.
isFocused booleanWhether the option is focused.
isSelected booleanWhether the option is selected.
children importThe children to be rendered.
react.NodeinnerRef react.Ref<*>Inner ref to DOM Node
react.Ref<*>innerProps objectprops passed to the wrapping element for the group.
{id string required key string required onClick required MouseEventHandleronMouseOver required MouseEventHandlertabIndex number required }label stringText to be displayed representing the option.
type stringype is used by the menu to determine whether this is an option or a group.
In the case of option this is always option.
data anyThe data of the selected option.
clearValue function() => undefinedclassName stringcx functionfunction (One of <One of <Object, undefined>, undefined>, One of <string, undefined>) => One of <string, undefined>getStyles functionGet the styles of a particular part of the select. Pass in the name of the
property as the first argument, and the current props as the second argument.
See the styles object for the properties available.
(string, any) => Objecttheme object{borderRadius number required colors object required Objectspacing required {baseUnit number required controlHeight number required menuGutter number required }}getValue function() => One of <Object, Array<Object>, null, undefined>hasValue booleanisMulti booleanoptions Array<object>Array<Object>selectOption function(Object) => undefinedselectProps anysetValue functionfunction (One of <Object, Array<Object>, null, undefined>, One of <"select-option", "deselect-option", "remove-value", "pop-value", "set-value", "clear", "create-option">) => undefinedchildren importThe children to be rendered.
react.NodeinnerProps objectprops passed to the wrapping element for the group.
ObjectclearValue function() => undefinedclassName stringcx functionfunction (One of <One of <Object, undefined>, undefined>, One of <string, undefined>) => One of <string, undefined>getStyles functionGet the styles of a particular part of the select. Pass in the name of the
property as the first argument, and the current props as the second argument.
See the styles object for the properties available.
(string, any) => Objecttheme object{borderRadius number required colors object required Objectspacing required {baseUnit number required controlHeight number required menuGutter number required }}getValue function() => One of <Object, Array<Object>, null, undefined>hasValue booleanisMulti booleanoptions Array<object>Array<Object>selectOption function(Object) => undefinedselectProps anysetValue functionfunction (One of <Object, Array<Object>, null, undefined>, One of <"select-option", "deselect-option", "remove-value", "pop-value", "set-value", "clear", "create-option">) => undefinedisDisabled booleanWhether the select is disabled.
isRtl booleanWhether the text in the select is indented from right to left.
children importThe children to be rendered.
react.NodeinnerProps objectInner props to be passed down to the container.
{onKeyDown required (SyntheticKeyboardEvent<HTMLElement>) => undefined}clearValue function() => undefinedclassName stringcx functionfunction (One of <One of <Object, undefined>, undefined>, One of <string, undefined>) => One of <string, undefined>getStyles functionGet the styles of a particular part of the select. Pass in the name of the
property as the first argument, and the current props as the second argument.
See the styles object for the properties available.
(string, any) => Objecttheme object{borderRadius number required colors object required Objectspacing required {baseUnit number required controlHeight number required menuGutter number required }}getValue function() => One of <Object, Array<Object>, null, undefined>hasValue booleanisMulti booleanoptions Array<object>Array<Object>selectOption function(Object) => undefinedselectProps anysetValue functionfunction (One of <Object, Array<Object>, null, undefined>, One of <"select-option", "deselect-option", "remove-value", "pop-value", "set-value", "clear", "create-option">) => undefinedchildren React$NodeThe children to be rendered.
React$Nodedata anyThe data of the selected option rendered in the Single Value component.
innerProps anyProps passed to the wrapping element for the group.
isDisabled booleanWhether this is disabled.
clearValue function() => undefinedclassName stringcx functionfunction (One of <One of <Object, undefined>, undefined>, One of <string, undefined>) => One of <string, undefined>getStyles functionGet the styles of a particular part of the select. Pass in the name of the
property as the first argument, and the current props as the second argument.
See the styles object for the properties available.
(string, any) => Objecttheme object{borderRadius number required colors object required Objectspacing required {baseUnit number required controlHeight number required menuGutter number required }}getValue function() => One of <Object, Array<Object>, null, undefined>hasValue booleanisMulti booleanoptions Array<object>Array<Object>selectOption function(Object) => undefinedselectProps anysetValue functionfunction (One of <Object, Array<Object>, null, undefined>, One of <"select-option", "deselect-option", "remove-value", "pop-value", "set-value", "clear", "create-option">) => undefinedisMulti booleanSet when the value container should hold multiple values
hasValue booleanWhether the value container currently holds a value.
children importThe children to be rendered.
react.NodeCopyright © Jed Watson, 2019. MIT Licensed.