Hello.
I am working on shinydashboard app with multiple tabs & I would like to render the tab content only when it is clicked on.
Atm the app is organized from most general to most detailed tab with general tab displaying when the app starts. This follows from the logical principle, that it is 1.the most used tab 2.the lightest one in terms of plot rendering (plots in all tabs are more or less the same but more detailed plots mean more information needs to be processed). Each tab has a different dataframe/sql table behind it (with the general tab, it is more efficient to just collect the whole sql table once, this might change with the heavier tabs).
What is the optimal way to trigger data collection when a different tab is clicked?
How should be the data stored(once rendered), so that when you get back to a tab that was previously rendered, you don't need to do it again? I am specifically looking for an generalized implemantation using shiny modules & functions.
Thank you.