patternfly / react-topology

MIT License
13 stars 20 forks source link

Dynamic context menu is not opened upward when there is not enough space downward #238

Open ferhoyos opened 1 month ago

ferhoyos commented 1 month ago

In the current situation, the react-topology context menu opens downward, but it changes direction to upward if there is not enough space:

Image

However, this does not happen with dynamic context menus - those created using promises, where some options depend on asynchronous processes like API calls. In this case, the context menu always opens downward, even when there is not enough space to display it properly.

Image

This is likely an issue of recalculating the best popper placement whenever the context menu component updates (after the promise is resolved)