ant-design Dropdown items on top are cut off

zz2j4svz  于 4个月前  发布在  其他
关注(0)|答案(2)|浏览(94)

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.

EnvironmentInfo
antd5.14.2
React18
SystemmacOS 14.2.1, Windows 11
BrowserChrome 122
ljsrvy3e

ljsrvy3e1#

Try to set height for Dropdown

fivyi3re

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.

相关问题