I am using shinydashboard and I am trying to condition the tabs on the tabBox function based on the user choices (for example if the user select option 1 then open tab1, tab2 and tab4 otherwise open tab3 and tab4). I tried to use the conditionalPanel function however it shift the tab outside the tabBox. Any suggestion how to do it?
It's not an elegant solution, but could you put each tab inside conditionalPanel()? Something like:
tabBox(
conditionalPanel([some condition], tabPanel([content of tab])),
conditionalPanel([some other condition], tabPanel([content of tab]))
)
Alternatively if you just want to have a different tab selected each time a user changes an option (rather than hiding/showing the tabs completely) then it might be worth looking at updateTabsetPanel().