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
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.
We also see this problem in the use case described by riskeez . Scrolling up & down renders random white spaces on top & bottom. Scrolling faster and longer lists seems to increase the problem.
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:
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.