Tab switch button server

tabSwitch(id, tab.id, parent.session)

Arguments

id

The input id to read value from.

tab.id

The id of sidebarMenu object.

parent.session

The session from parent scope.

Examples

if (interactive()) {
  library(shiny)
  library(shinydashboard)
  library(dcamodules)
  ui <- dashboardPage(
    dashboardHeader(),
    dashboardSidebar(
      sidebarMenu(
        id = "tabs",
        menuItem("awesome_tab")
      )
    ),
    dashboardBody(
      tabSwitchUI(
        id = "switch",
        tabItems(tabItem("awesome_tab"))
      )
    )
  )
  server <- function(input, output, session) {
    tabSwitch("switch", "tabs", session)
  }
  shinyApp(ui, server)
}