Remove custom-control element in bs4Dash header

104 views Asked by At

If I run the code from the "Basic Example" in https://rinterface.github.io/bs4Dash/articles/bs4Dash.html#basic-example, I get an extra custom control switch.

enter image description here

Any idea why this happens and how can I get rid of it?

Thank you

library(shiny)
library(bs4Dash)

shinyApp(
    ui = dashboardPage(
        header = dashboardHeader(
            title = dashboardBrand(
                title = "My dashboard",
                color = "primary",
                href = "https://adminlte.io/themes/v3",
                image = "https://adminlte.io/themes/v3/dist/img/AdminLTELogo.png"
            )
        ),
        sidebar = dashboardSidebar(),
        body = dashboardBody(
            lapply(getAdminLTEColors(), function(color) {
                box(status = color)
            })
        ),
        controlbar = dashboardControlbar(),
        title = "DashboardPage"
    ),
    server = function(input, output) { }
)
1

There are 1 answers

1
Jan On BEST ANSWER

Set help = NULL in dashboardPage():

library(shiny)
library(bs4Dash)

shinyApp(
    ui = dashboardPage(
        help = NULL,
        header = dashboardHeader(
            title = dashboardBrand(
                title = "My dashboard",
                color = "primary",
                href = "https://adminlte.io/themes/v3",
                image = "https://adminlte.io/themes/v3/dist/img/AdminLTELogo.png"
            )
        ),
        sidebar = dashboardSidebar(),
        body = dashboardBody(lapply(getAdminLTEColors(), function(color) {
            box(status = color)
        })),
        controlbar = dashboardControlbar(),
        title = "DashboardPage"
    ),
    server = function(input, output) {
        
    }
)