Closed stanyq4 closed 6 years ago
If you want a visual limit you can set max-height
on the dropdown menu via CSS. If you want to limit the number of items rendered I suggest filtering the list of items
outside of Autocomplete
instead of specifying the shouldItemRender
prop.
I found a little workaround to limit the children rendered in the menu using this prop:
renderMenu={ children => (
<div className= "menu">
{children.slice(0, maxMenuItems)}
</div>
)}
Not sure if there are any issues with this.
Is there an out of the box solution to set the max number of visible items in the drop-down?
Would be great to in case the item list is getting too big.