I'm putting together what I consider to be a very simple use case, but running into errors when trying to click on my Select
control.
I've put together a sandbox here: https://codesandbox.io/s/209j8v287r
Click on the select control. Note that it throws an error:
this.props.onMenuOpen is not a function. (In 'this.props.onMenuOpen()', 'this.props.onMenuOpen' is undefined)
Am I doing something wrong?
Found the issue. I was importing Select
like this:
import Select from "react-select/lib/Select";
changing to this fixed it.
import Select from "react-select";
Most helpful comment
Found the issue. I was importing
Select
like this:changing to this fixed it.