React drop down for large data items.
- This is designed for the purpose of handling large number of dropdown items.
- Most of the popular React dropdown libraries slow down massively when the dataset has more than 1000 items. This component can handle any large data set without any significant slowness.
- options : array, Array of elements.
- onChange : function(value)
- containerStyle : object, Style for main container.
- inputContainerStyle : object, Style for main container.
- inputStyle : object, Input text box style.
- disabled : boolean, true/false
- clearIconStyle : object, Clear textbox icon style
- createButtonStyle : object, Create option style
- onClickCreate : function (value), called when user clicks on create button,
- defaultValue : string, Initial value
npm i react-large-datalist
...
import ReactLargeDatalist from 'react-large-datalist';
...
...
<ReactLargeDatalist
options={["Option 1", "Option 2", "Option 3"]}
disabled={false}
defaultValue="Option 2"
onChange={(value) => {console.log("Selected value:", value)}}
onCreate={(newValue)=>{console.log("Created value", newValue)}}
/>
...
...