JedWatson / JedWatson/react-select
menuPlacement="auto" doesn't work if start search from 1 character
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
Hello!
It appears that the custom Menu, along with menuPlacement="auto" and menuPosition="fixed", consistently positions the menu below whenever it's rendered under certain conditions. In my situation, I need to show menu when at least one character is inputted.
Here is a demo:
https://codesandbox.io/s/react-select-v5-sandbox-forked-vlxzm2?file=/example.js
Note. For the old version of react-select it works as expected. Example:
https://codesandbox.io/s/react-select-menu-placement-forked-xh336l?file=/src/App.js
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
Start with the CodeSandbox demo's example.js and the older-version src/App.js reproduction, then trace the custom Menu behavior for menuPlacement="auto" and menuPosition="fixed" in the react-select source. Reproduce starting a search with one character and compare both demos; done means the menu chooses the appropriate placement instead of consistently rendering below.
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
- 35/100