I am using react-dropdown to create a dropdown for my page.
The component is as follows :
<Dropdown options={options} onChange={this.handleDropdownChange} placeholder="Select an option" />
Options is defined as follows :
const options = ['Safety', 'Consumable', 'Machinery', 'Hardware']
handleDropdownChange is defined as follows :
handleDropdownChange(e) {
console.log('Inside handleDropdownChange')
this.setState({ selectValue: e.target.value });
}
However the Dropdown doesn't expand when I click on it. Moreover I get no message in my print statement. Can someone please help me with the code here? I am relatively new to React JS. Thank you!