Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 140788

Drop down not expanding on click

$
0
0

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!


Viewing all articles
Browse latest Browse all 140788

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>