JedWatson / JedWatson/react-select

The available height is not correctly calculated when using the property menuPortalTarget

Open
#4,434 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

menu-bug
Dominant language
TypeScript
Stars
28k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

If the select component is configured with the property menuPortalTarget, the available height is not calculated correctly and the menu is chopped making the selection of some of the options impossible. The select must be at the bottom of the page.

For an example, refer to the example page of the react-select project and reduce your window to be able to see only a few options.
https://react-select.com/advanced#portaling

Screen Shot 2021-02-05 at 11 35 46

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the problem in the advanced portaling example at https://react-select.com/advanced#portaling by placing the select at the bottom of the page and reducing the window height. Trace how the available menu height is calculated when menuPortalTarget is set, then verify that all options remain reachable without the menu being chopped.

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
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.