JedWatson / JedWatson/react-select
menuPlacement=auto is not recalculated when options change after menu is opened
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
When using AsyncSelect with menuPosition="auto" towards the bottom of the page, once the options load the menu will be off screen.
It appears the menu position is not recalculated if the options/size of the menu changes after its opened.
Reproduction sandbox https://codesandbox.io/s/react-select-menuplacement-repro-wqkuew?file=/src/App.js https://wqkuew.csb.app/
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 in packages/react-select/src/components/Menu.tsx at the linked menu-positioning code, then reproduce the behavior in the provided CodeSandbox with AsyncSelect and menuPosition="auto". Trace how menu size or options changes are handled after opening; done means the menu is repositioned when asynchronously loaded options change its size and no longer overflows the viewport.
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
- Clearly specified
- Newbie friendliness
- 52/100