react-multiselect-box

0.2.3 • Public • Published

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.

Package Sidebar

Install

npm i react-multiselect-box

Weekly Downloads

3

Version

0.2.3

License

MIT

Unpacked Size

1.4 MB

Total Files

16

Last publish

Collaborators

  • facuesr