简体   繁体   中英

How to Disable Shiny bs4Dash Dashboard controlbar (Right Sidebar)

What is the parameter to control the right side bar on a Shiny bs4Dash dashboard. My reading of the dashboardControlbar function athttps://rinterface.github.io/bs4Dash/articles/step-by-step.html , which I understand to be the sidebar to the right of the page, is to set disable = T , in a similar way to how the dashboardSidebar(disable = T) controls the appearance sidebar to the left.

I have set controlbar = dashboardControlbar(disable = T) however on the Shiny App below and the right sidebar still opens when pressing the button at the top. Thanks for any suggestions in advance.

Edit (in response to dashboardHeader comment ): This question is in reference to bs4Dash V2.0.0 available via github. https://github.com/RinteRface/bs4Dash Please note that the github page also recommends github versions of htmltools and shiny.

library(shiny)
library(bs4Dash)


ui = dashboardPage(
  header = dashboardHeader(),
  sidebar = dashboardSidebar(
    disable = T
    ),
  body = dashboardBody(),
  controlbar = dashboardControlbar(
    disable = T
  ),
  title = ""
)

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

You can remove controlbar argument to disable it.

library(shiny)
library(bs4Dash)


ui = dashboardPage(
  header = dashboardHeader(),
  sidebar = dashboardSidebar(
    disable = T
  ),
  body = dashboardBody(),
  title = ""
)

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM