Reproduction link
Steps to reproduce
On top of the page, try to open a dropdown for the buttons in the lower half of the screen - which are opened to the top.
What is expected?
The dropdown items should be shown entirely, either by adding a scrollbar and limiting the max height or by moving the position of the popup to fit the entire dropdown like it was in the 4 version.
What is actually happening?
The upper items are cut off so that they cannot be reached.
Environment | Info |
---|---|
antd | 5.14.2 |
React | 18 |
System | macOS 14.2.1, Windows 11 |
Browser | Chrome 122 |
2条答案
按热度按时间ljsrvy3e1#
Try to set height for Dropdown
fivyi3re2#
Thanks for the hint. It solves the overlapping issue on top if you set
style: { height: 300, overflow: "auto" }
for the Menu.But the downside is that the height is also reduced for bottom items, where you have much more space.