react-select icon indicating copy to clipboard operation
react-select copied to clipboard

TypeError: __webpack_require__.i(…) is not a function in React-Select

Open shashankshahplutus opened this issue 7 years ago • 6 comments

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;

image Please help!

shashankshahplutus avatar Jun 27 '19 09:06 shashankshahplutus

Same issue here.

sobrinho avatar Jul 09 '19 19:07 sobrinho

Same issue here

sourabh504 avatar Jul 23 '19 13:07 sourabh504

Same issue

mrstalon avatar Jul 23 '19 16:07 mrstalon

I had this issue because I started my proejct in Codesandbox. When I downloaded the project, I realised that they use an older version of React by default. Updating to the latest version of React (16.8.6) resolved the issue for me.

LucidNinja avatar Aug 02 '19 09:08 LucidNinja

Thanks for the feedback @LucidNinja!

@shashankshahplutus, @sobrinho, @SourabhRanka, @mrstalon does this happen to solve the issue for you?

bladey avatar Jun 18 '20 01:06 bladey

This issue will now be closed due to inactivity. If anyone can provide further feedback, the issue will be re-opened.

bladey avatar Jun 29 '20 04:06 bladey