I am using react bootstrap dropdown, from here
When the items in my drop down list are many, the list gets overflown vertically which is not responsive as shown in the snapshot I want to add a scroll bar to it but am not able to. Please help.
This is my sample code
<DropdownButton
id="dropdown-basic-button"
title={this.props.passenger.seatNumber}
onSelect={(evt) => this.handleSeatSelection(evt)}
variant="info"
>
{this.state.availableSeatNumbers.map((seatNumber) => (
<Dropdown.Item key={seatNumber} eventKey={seatNumber}>
{seatNumber}
</Dropdown.Item>
))}
</DropdownButton>
You can simply give a fixed height to your dropdown menu class and set the overflow-y to scroll as written below
.dropdown-menu {
height: 300px;
overflow-y: scroll;
}