- 
                Notifications
    
You must be signed in to change notification settings  - Fork 4.2k
 
Closed
Labels
awaiting-author-responseIssues or PRs waiting for more information from the authorIssues or PRs waiting for more information from the authorissue/bug-unconfirmedIssues that describe a bug that hasn't been confirmed by a maintainer yetIssues that describe a bug that hasn't been confirmed by a maintainer yetissue/reviewedIssue has recently been reviewed (mid-2020)Issue has recently been reviewed (mid-2020)
Description
I am using react-select plugin for multiple selection from dropdown.
For installation i have done
npm install react-select --save
which installed latest version 3.0.4 of react-select plugin
My code is
import React, { Component } from 'react';
import Select from 'react-select';
import urls from '../../../urls.json';
const options = [
  { value: 'chocolate', label: 'Chocolate' },
  { value: 'strawberry', label: 'Strawberry' },
  { value: 'vanilla', label: 'Vanilla' },
];
class Reports extends Component {
  constructor(props) {
    super(props);
    this.state = {
      selectedOption: null,
    };
  }
  handleChange = selectedOption => {
    this.setState({ selectedOption });
    console.log(`Option selected:`, selectedOption);
  };
  componentDidMount() { }
  render() {
    return (
      <div>
        <div className="row">
          <div className="col-md-12">
            <h2>Reports</h2>
            <hr className="title-separator" />
            <Select
                value={this.state.selectedOption}
                onChange={this.handleChange}
                options={options}
            />
          </div>
        </div>
      </div >
    )
  }
}
export default Reports;
Thuran, alexmylonas, sobrinho, shashankshahplutus and LucidNinja
Metadata
Metadata
Assignees
Labels
awaiting-author-responseIssues or PRs waiting for more information from the authorIssues or PRs waiting for more information from the authorissue/bug-unconfirmedIssues that describe a bug that hasn't been confirmed by a maintainer yetIssues that describe a bug that hasn't been confirmed by a maintainer yetissue/reviewedIssue has recently been reviewed (mid-2020)Issue has recently been reviewed (mid-2020)
