3.0.0 • Published 4 years ago

react-multiple-select-dropdown v3.0.0

Weekly downloads
39
License
MIT
Repository
github
Last release
4 years ago

react-multiple-select-dropdown(tiny now!!)

npm.io npm.io

NPM JavaScript Style Guide

Install

npm install --save react-multiple-select-dropdown

Usage

import React, { Component } from 'react'
import MultipleSelect from 'react-multiple-select-dropdown';
import 'react-multiple-select-dropdown/dist/index.css';

class YourWrapperComponent extends Component {
  // drop your items here.it could be thousands(we use virtual list so there is no problem)
  state = {
    selectedOptions: [],
    options: [
    { value: 1, label: 'react' },
    { value: 2, label: 'reactnative' },
    { value: 3, label: 'nodejs' },
    { value: 4, label: 'redux' },
    { value: 5, label: 'mobx' }
    ]
  }

  onChange = (selectedOptions) => {
    this.setState({ selectedOptions: selectedOptions });
  }

  render() {
  const { selectedItems, options } = this.state;
  return (
    <div>
      <MultipleSelect
        selectedOptions={selectedItems}
        options={options}
        onChange={this.onChange}
      />
    </div>
);
}

to see props go to docs

feel free to report bugs and request feature

License

MIT © arminyahya

3.0.0

4 years ago

2.2.3

4 years ago

2.2.1

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago