JedWatson / JedWatson/react-select
react-select does not scroll into view selected option when `menuPortalTarget={document.body}`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
react-select does not scroll into view selected option when
we use menuPortalTarget={document.body}
In docs example:
https://react-select.com/advanced#portaling
Or please check this codesandbox:
https://codesandbox.io/s/codesandboxer-example-forked-c5xp8p?file=/example.tsx
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 issue using the Advanced portaling documentation example or the linked CodeSandbox. Compare selected-option behavior with and without menuPortalTarget={document.body}, then trace the relevant TypeScript component and tests. Done means the selected option scrolls into view when the menu is portaled, with existing behavior preserved otherwise.
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
- 42/100