jacobworrel / react-windowed-select

An integration of react-window with react-select to efficiently render large lists.
MIT License
142 stars 38 forks source link

Menu Size #12

Closed mwskwong closed 5 years ago

mwskwong commented 5 years ago

Just a small thing: The calculation of menuHeight is sometimes smaller than the actual height of the menu, adding an offset fix this problem.

i.e. In https://github.com/jacobworrel/react-windowed-select/blob/master/src/MenuList.js#L77 Change it to:

const offset = 1; // offset = 1 is enough for me
const menuHeight = Math.min(maxHeight, totalHeight) + offset;
jacobworrel commented 5 years ago

@matthewkwong2 Thanks for logging this issue. Would you mind providing a codesandbox or code snippet that shows how you're using the library so I can reproduce this bug?

Thanks!

jacobworrel commented 5 years ago

@matthewkwong2 I'm unable to reproduce this based on the description you provided so I'm closing this issue. Will reopen if you provide a way for me to reproduce.