palantir/blueprint

Submenu with many menu items are not correct calculated top position

Open

#3,871 建立於 2019年11月29日

在 GitHub 查看
 (8 留言) (2 反應) (0 負責人)TypeScript (20,263 star) (2,167 fork)batch import
P3Package: coreType: enhancementhelp wanted

描述

Environment

  • Package version(s): @blueprintjs/core@3.22.0
  • Browser and OS versions: Chrome 78.0.3904.108 Windows 10

https://codesandbox.io/s/gifted-snow-00f0h

Steps to reproduce

  1. I just took an example from the official documentation
  2. Added a lot of child items to a menu item called style
  3. When I open a submenu in a menu item called a style, I see part of the submenu, the other part of the submenu is outside the window.

Actual behavior

Big submenu is outside the window.

Expected behavior

The submenu is positioned at the top of the container and have scrolling.

Possible solution

You can position the submenu on the top edge using the position: “auto-end” property, but in this case the submenu will also be outside the window, but at the bottom of it. I think it would be right to calculate the actual size of the container and not allow the submenu to be large, but to have scrolling instead.

貢獻者指南