Socket
Socket
Sign inDemoInstall

react-multiple-select-dropdown

Package Overview
Dependencies
9
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-multiple-select-dropdown

a responsive multi select component


Version published
Weekly downloads
32
increased by68.42%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

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

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

Keywords

FAQs

Last updated on 16 Dec 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc