I want when i start the application the tab panel tab2 = desactivated, and will be activated once i click the button in the first tab panel tab1, i tried with shinyjs and through CSS properties but i can not do that.
thanks for your help Alex
library(shiny)
library(shinyjs)
runApp(list(
ui = bootstrapPage(
tabsetPanel(
tabPanel(title = "tab1", id="tab1",
br(),
actionButton("click", label = "View tab2 panel")),
tabPanel(title = "tab2", id="tab2")
)
),
server = function(input, output, session){
}
))
You need a bit of javascript to do this. Here's a solution using shinyjs. I also included some css to make it clear when the tab is disabled
You could also put the javascript in a separate file and use
extendShinyjs(file = ...)
instead ofextendShinyjs(text = ...)
.