Force rendering of module's UI on not visible tab

shiny-modules
bookmark

#1

Hi all,
I have a fairly complicated app. It contains miniTabstripPanel in the main app's ui. Lets say it contains tabs A and B. Then there is dynamically called module which UI is on the panel B. I am trying to restore the content of the app from bookmarking (from url) but because selectInputs from the module contains choice list based on the input from the main app, I use onRestore function to keep the values from url state for restoring the values later. Indeed, when the inputs in the main apps are restored, the observer in the module (observing those inputs passed as parameters to the module call), which runs the updateSelectInput(), triggers, and updates the SelectInputs with correct choice list and previously saved values (saved in onRestore()).
If panel B is the deafult to be seen, then my app restores well.
The thing is, if the panel A is the default one, the UI function of the module is not called until I go to the panel B. So the observer cannot update the SelectInputs because they dont exist yet.

Is there a way how to force rendering moduleUI if it is not on visible panel? I believe that if I could do that, the the UI part of the module would exist and be updated.

Is there any other approach which I might have missed?
Thank you


#2

Hi machli, is there a way you could share a small version of this app? That would help me understand the problem.


#3

Hi Timothy,
I know that would be helpfull, I will probably do later if needed, but its not 10 minutes operation. For now, is there maybe some part which is not clear especially?


#4

Maybe take a look at outputOptions. e.g.,

outputOptions(output, "your_label", suspendWhenHidden = FALSE)


#5

vnijs - you rules! great, completely forgot about this function. Thanks it works!