React Multi-list Selector
Install
$ npm i --save react-multiselect-list
Use it in any component
;; class <your_componenet> extends Component { // 'selectedValues' contains your selected values // You can set state here } { return <Multiselect list='item1' 'item2' 'item3' title='title' onSelectItem=thisyour_function /> }
Props
Name | Type | Required | Description |
---|---|---|---|
list | Array | Yes | The List of items you'll be selecting from |
title | string | Yes | Title of your list |
onSelectItem | Function | Yes | Callback from your component |
selected | Array | No | Pass values that you want selected by default |
theme | String | No | Choose from ('red', 'green', 'lightblue', 'yellow', 'blue') to match with your theme. Blue is the default theme |
Development
$ git clone https://github.com/hkureshy/react-multiselect-list.git$ cd react-multiselect-list$ npm install$ npm start
Feel free to contact if you find any problem using this package.
Email: hassnainkureshy@gmail.com