Sidebar's Sub-Menu is hidden

When the sub-menu pops up when the sidebar is collapsed, there is a phenomenon that the bottom is not displayed if there are many menus.

If there are many menus, some menus below will not be displayed and will be hidden.
In this case, is it possible to automatically move the menu upwards?

Greetings!

We would rather recommend you to change the height of popup. Example: Code Snippet
In the example above, the height of popup is calculated. If there is no enough space to place this popup, its height decreases and a scroll appears.

Kind regards,