Native select component is better for mobile devices as it open a native modal for selection.
Select
component propsName | Type | Usage |
---|---|---|
.. | All div element props | |
options | array | Array of option objects containing key & label |
value | object | Object of key & label |
onChange | function | |
placeholder | string | |
simpleSearch | function | Show search box in dropdown |
onSearch | function | For advanced search implementation |
clearable | boolean | |
disabled | boolean | |
optionsSpace | boolean | Leave margin for dropdown options |
loading | boolean | To show loader in place of dropdown options |
valueHOC | function | Selected value HOC to customize selected option |
optionHOC | function | Option HOC to customize option in list |
Select.Native
component propsName | Type | Usage |
---|---|---|
.. | All input element props | |
options | array | Array of option objects containing key & label |
value | string | Selected option key |
onChange | function | |
disabled | boolean |
A basic text based Search
method is provied with Select
component. For calling API or any other functionality, search method need to be implemented with onSearch
.