For some reason I can't seem to figure out how to get the value of the selected tab in a shiny gadget. I thought it'd be straight forward, but this isn't working. Not sure if there's a bug, or if I'm missing something.
library(shiny)
library(miniUI)
ui <- miniPage(
miniTabstripPanel(
id = "mytabs",
miniTabPanel("Tab 1", value = "tab1", "tab 1"),
miniTabPanel("Tab 2", value = "tab2", "tab 2"),
miniTabPanel("Tab 3", value = "tab3", "tab 3")
)
)
server <- function(input, output, session) {
observe({
cat(input$mytabs)
})
}
runGadget(ui, server)