react-multiselect-box
v0.2.3
Published
A multiselect box component for React.
Downloads
36
Maintainers
Readme
React Multi-Select-Box
Description
A multiselect box component for React. This use react-virtualized and is based on an old jquery plugin.
Demo
Live demo: https://facuesr.github.io/react-multiselect-box/
Installation
npm install react-multiselect-box --save
Then, you can import react-multiselect-box in your app as follows:
import MultiSelectBox from 'react-multiselect-box'
import 'react-multiselect-box/build/css/index.css'
Usage
<MultiSelectBox
options={[
{ desc: 'Item 1', value: '1' },
{ desc: 'Item 2', value: '2' },
{ desc: 'Item 3', value: '3' }
]}
labelKey="desc"
valueKey="value"
onAdd={selectedItem => {
}}
onRemove={(removedItem, index) => {
}}
onSelectAll={selectedItems => {
}}
onRemoveAll={() =>
}
valueArray={[2,3]}
/>
Contributors
Thanks Federico Vicente for help with the styles.
License
MIT Licensed.