I have a problem with my dashboard. I want create a dynamic sidebar menu, but by default, Menu item don't work. The user has to clic on it to show it. I have find an example on this problem https://github.com/rstudio/shinydashboard/issues/71 but the solution don't work. If you have ideas... thank you in advance
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(title = "Dynamic sidebar"),
dashboardSidebar(
sidebarMenuOutput("menu")
),
dashboardBody(tabItems(
tabItem(tabName = "dashboard", h2("Dashboard tab content"))
))
)
server <- function(input, output) {
output$menu <- renderMenu({
sidebarMenu(id="mytabs",
menuItem("Menu item", tabName="dashboard", icon = icon("calendar"))
)
})
}
shinyApp(ui, server)