You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MenuList with simplebar-react and menuPlacement="auto" never uses placement="top" #4812
Bug:
react-select@v4.3.1 with simplebar-react@2.3.5 and menuPlacement="auto" is always positioning menu to "bottom".
When using react-select in combination with simplebar-react the functionality of menuPlacement="auto" is lost and it always falls back to menuPlacement="bottom".
For some reason the MenuPlacer is not correctly determining the placement when used in combination with simplebar-react.
How to reproduce: Make the browser window small enough and open the dropdowns.
The dropdown with placeholder "Select without Simplebar" will render the menu above. (correct)
The dropdown with placeholder "Select with Simplebar" will render the menu below (wrong)
@GP-marco I will be compiling a list of various issues with our current Menu positioning, styling, and scrolling and will pull this into the list of known issues.
simplebar-react initializes far later then our Select component calculates the placement. When opening the menu, the list has an initial height of 0px with a overall padding of 8px. It's not until simplebar-react has initialized that the list gains actual height. But as already stated that is far too late for our placement deduction.
But you can negate that problem by adding styles targeting simplebar-react elements:
Activity
ebonow commentedon Oct 15, 2021
@GP-marco I will be compiling a list of various issues with our current Menu positioning, styling, and scrolling and will pull this into the list of known issues.
HIT2022 commentedon Jan 20, 2022
Anyone ever figure out a solution to this?
nodir-sulaymonov commentedon Feb 4, 2022
@ebonow Were you able to solve this problem? I also use simplebar-react in a project and my menuPlacement is always bottom too.
Rall3n commentedon Feb 5, 2022
simplebar-reactinitializes far later then ourSelectcomponent calculates the placement. When opening the menu, the list has an initial height of0pxwith a overall padding of8px. It's not untilsimplebar-reacthas initialized that the list gains actual height. But as already stated that is far too late for our placement deduction.But you can negate that problem by adding styles targeting
simplebar-reactelements:This ensures that the list renders with the needed height to properly calculate the placement.