JedWatson / JedWatson/react-select
Extra Space in Dropdown Menu of React Select Component on Initial Render
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
The React Select component is not rendering correctly on the first load. The dropdown menu has extra space at the bottom. This issue only occurs on the initial render
After the initial render it works as expected:
CODE:
<Select
isMulti
options={roomValues}
components={animatedComponents}
value={productRooms}
onChange={onChangeRoomSelect}
getOptionLabel={(option) => option.roomNameObj[activeLanguage.id]}
className="z-[99] h-max"
/>
Expected Behavior:
The dropdown menu should fit the number of items without any extra space.
Actual Behavior:
On the first render, the dropdown menu has extra space at the bottom. On subsequent renders, the dropdown menu fits the number of items correctly.
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 supplied React Select reproduction and inspect the Select component's initial render and dropdown sizing behavior. Compare the first render with subsequent renders using the provided code and screenshots. Done means the menu fits the number of items on the initial render as well as later renders.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100