Show/hide multiple modules using navigation or sidebar

I'm trying to figure out the best way to do this. What I have is a number of modules that I want to combine together to make a single webapp.

I want to use the navigation component or sidebar for navigation. What I thought would be possible is to just show/hide the modules depending on what navigation element is selected. But there is no click handler to show/hide a module. I tried also customerView.setHidden(true) But that didn't have an effect either.

What's the best way to handle one single sidebar or navigation that is persistent with the "body" of the app changing to different modules or apps? When I tried having the menu items open a new app when clicked, it loads the different app, but the sidebar isn't there. Do I need to build the same sidebar for every app I want to integrate into this single webapp? Seem like there should be a simpler way.

Thanks!

@hess411 Have you tried adding the module into a container and then hiding the container using setHidden?

1 Like

Yes...I mentioned that in my initial post, but maybe wasn't clear. I tried an event handler for each menu item to hide the other modules (not related to the menu item clicked)...like customerView.setHidden(true) where customerView is the name of my module, but that has zero affect.

Screenshots?

Hi there! it would be helpful to see screenshots, as Scott mentioned.

For our module product, they don't have a setHidden method yet :disappointed: The feature request & workaround can be found here

Typically, users will build a nav module and then import that module into each app