RinteRface / shinydashboardPlus

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

Menu Item with Sub Menu Item Arrow Not Rotating #78

Closed owbezick closed 3 years ago

owbezick commented 4 years ago

Arrow does not rotate when using dashboardPagePlus

ui <- dashboardPagePlus(
  dashboardHeaderPlus(),
  dashboardSidebar(
    sidebarMenu(type = "aside", class = "main-sidebar"
                ,id = "sidebar"
                , menuItem(tabName = "1", text = "Menu Item One", icon = icon("home"))
                , menuItem(tabName = "2", text = "Menu Item One", icon = icon("home")
                           , shinydashboard::menuSubItem(tabName = "3", text = "Sub Menu Item One", icon = icon("circle"))
                           , shinydashboard::menuSubItem(tabName = "4", text = "Sub Menu Item One", icon = icon("circle"))
                )
    )
  )
  ,
  dashboardBody()
)
server <- function(input, output) { }
shinyApp(ui, server)

vs

ui <- dashboardPage(
  dashboardHeader(),
  dashboardSidebar(
    sidebarMenu(type = "aside", class = "main-sidebar"
                ,id = "sidebar"
                , menuItem(tabName = "1", text = "Menu Item One", icon = icon("home"))
                , menuItem(tabName = "2", text = "Menu Item One", icon = icon("home")
                           , shinydashboard::menuSubItem(tabName = "3", text = "Sub Menu Item One", icon = icon("circle"))
                           , shinydashboard::menuSubItem(tabName = "4", text = "Sub Menu Item One", icon = icon("circle"))
                )
    )
  )
  ,
  dashboardBody()
)
server <- function(input, output) { }
shinyApp(ui, server)
omerkara commented 2 years ago

Hello, I am having the same problem in version 2.0.4.9000. The menu item arrow does not rotate when using shinydashboardPlus::dashboardPage() function.

Please see below for an example.

library(shiny)
library(shinydashboard)
library(shinydashboardPlus)

header <- shinydashboard::dashboardHeader()

sidebar <- shinydashboard::dashboardSidebar(
    sidebarMenu(
        id = "tabs",
        menuItem("Menu Item 1", icon = icon("calendar"),
                 sliderInput(
                     inputId = "slider1",
                     label = "Dummy Label",
                     min = 0, max = 10, step = 1, value = 5
                 )
        ),
        menuItem("Menu Item 2", icon = icon("calendar"),
                 sliderInput(
                     inputId = "slider2",
                     label = "Dummy Label",
                     min = 0, max = 10, step = 1, value = 5
                 )
        )
    )
)

body <- shinydashboard::dashboardBody()

shinyApp(
    ui = shinydashboard::dashboardPage(header, sidebar, body),
    server = function(input, output) { }
)

vs

library(shiny)
library(shinydashboard)
library(shinydashboardPlus)

header <- shinydashboard::dashboardHeader()

sidebar <- shinydashboard::dashboardSidebar(
    sidebarMenu(
        id = "tabs",
        menuItem("Menu Item 1", icon = icon("calendar"),
                 sliderInput(
                     inputId = "slider1",
                     label = "Dummy Label",
                     min = 0, max = 10, step = 1, value = 5
                 )
        ),
        menuItem("Menu Item 2", icon = icon("calendar"),
                 sliderInput(
                     inputId = "slider2",
                     label = "Dummy Label",
                     min = 0, max = 10, step = 1, value = 5
                 )
        )
    )
)

body <- shinydashboard::dashboardBody()

shinyApp(
    ui = shinydashboardPlus::dashboardPage(header, sidebar, body),
    server = function(input, output) { }
)

Is the previously closed issue still a problem or is it specific to my computer?

Thanks,