JedWatson / JedWatson/react-select
MenuList with simplebar-react and menuPlacement="auto" never uses placement="top"
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
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.
Test case: https://codesandbox.io/s/suspicious-rumple-ni52n
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)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the two dropdown cases in the linked CodeSandbox with a small browser window. Then inspect MenuPlacer in packages/react-select/src/components/Menu.js, focusing on how menuPlacement="auto" is determined with simplebar-react. Done means the simplebar dropdown chooses top when there is insufficient space below, matching the non-simplebar case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100