I am looking for a way to hide main header toggle icon as we do for side bar in R Shiny App using ShinyJS Package. Attaching the Image for the reference.
Code
library(shiny)
library(shinydashboard)
library(shinyjs)
ui <- shinyUI(dashboardPage(
dashboardHeader(),
dashboardSidebar(),
dashboardBody(
useShinyjs()
)
))
server <- shinyServer(function(input, output, session) {
addClass(selector = "body", class = "sidebar-collapse") # Hide Side Bar
})
shinyApp(ui = ui, server = server)
I was stuck with same problem..below is the solution...Let me know if it works for you:-
you can update the
dashboardHeader
function and remove the item which creates the button. Note that I just commented it out and renamed the function.