Tracks the active tab and exposes it as a reactive value.
Arguments
- id
Module id matching the
idpassed toglassTabsUI().
Examples
if (interactive()) {
library(shiny)
ui <- fluidPage(
useGlassTabs(),
glassTabsUI(
"tabs",
glassTabPanel("a", "A", p("Tab A"), selected = TRUE),
glassTabPanel("b", "B", p("Tab B"))
)
)
server <- function(input, output, session) {
active <- glassTabsServer("tabs")
observe(print(active()))
}
shinyApp(ui, server)
}