[OutSystems UI] Keeping side menu submenu expanded
outsystems-ui
Reactive icon
Forge component by Platform Maintenance
Application Type
Reactive

In reactive OutSystems ui, 2.8.3, for layout side menu, has anyone been able to accomplish the following: that in one of the submenus there, the items inside it (links to a new screen) can be clicked and new screen opens , but that submenu remain expanded with its items still showing?

Solution

Ok it's working now. For the extended class in each Submenu widget, I just had to change:


"app-menu-link" + If(ActiveItem = 5, " open","")

To:

"app-menu-link" + If(ActiveItem = 5, " open osui-submenu--is-open","")

In other words, I just had to add the osui-submenu--is-open class.  The secret was cloning outsystems ui, and then in the outsystems.ui javascript file there, it showed that this

osui-submenu--is-open

is the new class for "open".

Hi @Nitin Batra 

Can you share some more insights of what exactly you want to achieve. A screenshot or an OML will be helpfull.


Thanks

Shubham

Hi @Nitin Batra  

To achieve that we can use the client action SubmenuOpen on the destination screen and trigger it according to your business rules.

Cheers,
GM

OML attached. So in the "Audit" UI Flow, in Screen "AuditSearch", I have an input parameter SubMenu which gets passed the widget id of the appropriate submenu. And in that OnRender, you can see where I'm calling SubMenuOpen on it.   The debugger against OnRender shows the right value being passed (matching the widget id as shows in inspector) and it goes right through SubMenuOpen without expanding submenu for a second.

AdminPortal.oml

Just to add to this: It works fine in Chrome, but not in Edge or Firefox.

Solution

Ok it's working now. For the extended class in each Submenu widget, I just had to change:


"app-menu-link" + If(ActiveItem = 5, " open","")

To:

"app-menu-link" + If(ActiveItem = 5, " open osui-submenu--is-open","")

In other words, I just had to add the osui-submenu--is-open class.  The secret was cloning outsystems ui, and then in the outsystems.ui javascript file there, it showed that this

osui-submenu--is-open

is the new class for "open".

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.