Select component with search or clear only
Select with search & clear
⭐ Native select component
Native Select
Native select component is better for mobile devices as it open a native modal for selection.
Select
component props
Name | 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 | |
onSearch | function | Shows search box only if search function is passed |
clearable | boolean | |
disabled | boolean | |
valueHOC | function | Selected value HOC to customize selected option |
optionHOC | function | Option HOC to customize option in list |
Select.Native
component props
Name | Type | Usage |
---|
.. | | All input element props |
options | array | Array of option objects containing key & label |
value | string | Selected option key |
onChange | function | |
disabled | boolean | |
Select.search
function arguments
Name | Type | Usage |
---|
search | string | Searched text |
options | array | Select input field options |
caseSensitive | boolean | (Default: false ) |
A basic text based Search
method is provied with Select
component. For calling API or any other functionality, search method need to be implemented.