Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra Space in Dropdown Menu of React Select Component on Initial Render #5886

Open
EjDadivas opened this issue Apr 1, 2024 · 1 comment
Labels
issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet

Comments

@EjDadivas
Copy link

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
image

After the initial render it works as expected:
image

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.

@EjDadivas EjDadivas added the issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet label Apr 1, 2024
@riskeez
Copy link

riskeez commented May 6, 2024

Firefox 125.0.3 (Windows 11)

Where? https://react-select.com/home
How? Just scrolling up and down

Animation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet
Projects
None yet
Development

No branches or pull requests

2 participants