Possible bug in getting the currently selected tab in a gadget using miniTabstripPanel
Opened this issue · 6 comments
daattali commented
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)
qinzhu commented
It seems the CRAN version of this package still has this bug. Also for the dev version, the value argument for miniTabPanel seems useless, the title is always the return value.
vnijs commented
wcmbishop commented
It looks like this is still an issue. I can't seem to get the id
field to work with miniTabstripPanel
to identify the active tab.
Did anyone find a workaround for identifying the active tab?
zx8754 commented
alistaire47 commented
This still doesn't behave how its docs say it does. Using the full name (even with spaces) does work, though.