I have a Shiny app where there are two tabPanels in a tabsetPanel. The widgets in the tabPanels are dynamically created based on values in a data frame (called stager) that is loaded from mySQL. The input values (selected) for the second tabPanel checkbox are only initialized when the the tab is clicked on but I want them initialized when the Shiny app is run. The server and UI code is below:
Server code (2nd tabPanel):
output$Box4 = renderUI(checkboxGroupInput('showcols',
'Columns to show:',
names(stager2()),
selected = names(stager2()[c(1,6,10,11,14,15,18,19,20)])))
UI code (2nd tabPanel):
tabPanel("Select Columns",
hr(),
uiOutput("Box4")
)
Any ideas on how to get the input values to initialize when the app is run are much appreciated.