RinteRface / shinydashboardPlus

extensions for shinydashboard
https://shinydashboardplus.rinterface.com
Other
454 stars 77 forks source link

`collapsed = FALSE` not working for dashboardControlbar #107

Closed kendavidn closed 3 years ago

kendavidn commented 3 years ago

Hello! Thank you for the phenomenal package.

The following code (modified from the help page of dashboardControlbar) should turn off auto-collapse of the right sidebar/controlbar, but it doesn't for me.

Might I be doing something wrong?

devtools::install_github("RinteRface/shinydashboardPlus")
library(shiny)
library(shinydashboard)
library(shinydashboardPlus)
shinyApp(
  ui = dashboardPage(
    header = dashboardHeader(),
    sidebar = dashboardSidebar(),
    body = dashboardBody(),
    controlbar = dashboardControlbar(
      collapsed = FALSE, # Don't collapse by default
      skin = "dark",
      controlbarMenu(
        id = "menu",
        controlbarItem(
          "Tab 1",
          "Welcome to tab 1"
        ),
        controlbarItem(
          "Tab 2",
          "Welcome to tab 2"
        )
      )
    ),
    title = "Right Sidebar"
  ),
  server = function(input, output) { }
)
kendavidn commented 3 years ago

Works like magic now! Thank you so much; You're a role model!