Dynamically show modules/apps per tab/menu option

Hi all, I've built and app that contains 5 tabs using tabbed container (1 is hidden) each tab has a module on it. The issue here is that the app gets very slow, because each module it's like an app, which has it's own queries and logic, and on the page load, all queries set to run on the page load are ran, which leads to slowness, all the operations in the app are slow, opening modals, running a query, the experience is terrible.

So my first question is: Is there a way to load this modules (with all it's queries) dynamically only when the user selects each tab?

I was also looking into other way to achieve my goal, like centralizing all logic and queries into one app. I tried using a Sidebar with a navigation container:

But the issue here is: if I select an option to open an App, it replaces the current app with the one that I clicked in the navigation option, which is not what I want, I want to dynamically open the Apps/modules inside a container of the current app when the user clicks on it's option/tab. Is this behavior achievable? Or there is any other option to this?

When selecting from the sidebar, you could set the tab value to the key you want to show in the container
tabs1.setValue(0) if Page Manager key is 0, and so on

For performance, I usually run queries based on if the key = X then run under the advanced tab of the queries supporting the tabbed view specifically

The sidebar and tabs will not be used together, they're just two different things I've tried using to achieve the goal, but no luck with neither of them. Also, the thing is that I have hundreds of queries (~400) if I count all modules in the same app, and some of them are set to run at the page load, my goal is to show an app/module when selecting a tab (this is doable, but the main thing is to also load the app/module queries only when the tab is selected)

Hello i think that by combining this Trigger a module query from the parent app, you can set the input in your module where you pass the selected tab as a variable, then in the on Success run your queries and set a "only run when" when input.value === "tab1"

When selecting a tab, set the variable

btw you can open another app in a new tab

1 Like