How to hide a Menu oder MenuItem in Jmix 2.x

Hello,
in Jmix 2.5 I try to hide a menu or a menu item from menu.xml working from the controller in main view.
In previous versions we hade sidemenu > getMenuItem > setvisible().

How can we do this now?

Thanks,
best regards
HP

Hello!

I created a GitHub issue to support setVisible() feature: Implement the "visible" property for MenuItem · Issue #4557 · jmix-framework/jmix · GitHub

For now, you can hide a menu item by removing it from the menu and display it by adding it back.