Skip to content

Repository files navigation

React-Select2

React wrapper for Select2

Installation

npm install react-select2-wrapper --save

Usage

importSelect2from'react-select2-wrapper';<Select2multiple={true}data={['bug','feature','documents','discussion']}options={{placeholder: 'search by tags',}}/>

With callbacks

<Select2multiple={true}data={['bug','feature','documents','discussion']}onOpen={()=>{console.log('onOpen');}}onClose={()=>{console.log('onClose');}}onSelect={()=>{console.log('onSelect');}}onChange={()=>{console.log('onChange');}}onUnselect={()=>{console.log('onUnselect');}}options={{placeholder: 'search by tags',}}/>

Themes

Default theme in src/css/select2.css

Development

  • Run webpack-dev-server

    npm run start
    
  • Run webpack in watch mode

    npm run watch
    
  • Run webpack for build

    npm run build
    

About

React wrapper for Select2

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages