React wrapper for Select2
npm install react-select2-wrapper --save
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',}}/>Default theme in src/css/select2.css
Run webpack-dev-server
npm run startRun webpack in watch mode
npm run watchRun webpack for build
npm run build