Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201894

How to deploy R shinydashboard with menuSubItem not collapsed by default

$
0
0

Below is some simple sample code for shinydashboard with various subMenuItem objects under a menuItem. By default, when the app is deployed the subMenuItems are collapsed. Is there a way to set it so that they are not collapsed?

ui <- dashboardPage(
  dashboardHeader(title='Head'),
  dashboardSidebar(
    sidebarMenu(
      menuItem('Tabs', tabName='tabs',
        menuSubItem('Tab 1', tabName='tab1'),
        menuSubItem('Tab 2', tabName='tab2'),
        menuSubItem('Tab 3', tabName='tab3')
      )
    )
  ),
  dashboardBody(
    tabItems(
      tabItem(tabName='tab1',
        h1("Tab 1")
      ),
      tabItem(tabName='tab2',
        h1("Tab 2")
      ),
      tabItem(tabName='tab3',
        h1("Tab 3")      
      )
    )
  )
)

server <- function(input, output, session) {}

shinyApp(ui, server)

Viewing all articles
Browse latest Browse all 201894

Trending Articles