JedWatson / react-select

The Select Component for React.js
https://react-select.com/
MIT License
27.54k stars 4.12k forks source link

menuPlacement=auto is not recalculated when options change after menu is opened #5642

Open joshhunt opened 1 year ago

joshhunt commented 1 year ago

When using AsyncSelect with menuPosition="auto" towards the bottom of the page, once the options load the menu will be off screen.

image

It appears the menu position is not recalculated if the options/size of the menu changes after its opened.

https://github.com/JedWatson/react-select/blob/3aee85cb8c5d045d47d45b0f9ebd0c58d4593c42/packages/react-select/src/components/Menu.tsx#L342-L363

Reproduction sandbox https://codesandbox.io/s/react-select-menuplacement-repro-wqkuew?file=/src/App.js https://wqkuew.csb.app/

ayuka-bg commented 9 months ago

same here