score:4

Accepted answer
import React from "react";
import ReactDOM from "react-dom";
import ReactMultiSelectCheckboxes from 'react-multiselect-checkboxes';

class App extends React.Component {
  doSomething = () => {
    console.log('something')
  }
  render () {
    const options = [
      { label: 'Thing 1', value: 1},
      { label: 'Thing 2', value: 2},
    ];
    return (
      <div className="App">
        <ReactMultiSelectCheckboxes
          onMenuClose={this.doSomething}
          options={options} />
      </div>
    );
  }
}

const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);

Related Query

More Query from same tag