Skip to content

Possible bug in getting the currently selected tab in a gadget using miniTabstripPanel #5

@daattali

Description

@daattali

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions