bs4Dash icon indicating copy to clipboard operation
bs4Dash copied to clipboard

Dynamic `dashboardBrand` does not collapse with the `sidebarMenu` with `fixed=T & minified=F`

Open shahreyar-abeer opened this issue 2 years ago • 1 comments

The dashboardBrand (generated dynamically) does not collapse with the sidebarMenu as seen in the video. It hides when the user scrolls up. Also, it does not show up when the menu is expanded until the user scrolls.

Video

The above error is produced by the following app


library(shiny)
library(bs4Dash)

ui <- dashboardPage(
  dashboardHeader(
    title = uiOutput("title"),
    fixed = TRUE
  ),
  dashboardSidebar(
    fixed = TRUE,
    minified = FALSE,
    sidebarMenu(
      id = "sidebarMenu",
      menuItem(
        text = "Tab 1",
        tabName = "tab1"
      )
    )
  ),
  dashboardBody()
)
server <- function(input, output) {
  output$title = renderUI({
    dashboardBrand(
      title = "bs4Dash App",
      color = "gray",
      href = NULL
    )
  })
}
shinyApp(ui = ui, server = server)

shahreyar-abeer avatar Nov 09 '22 10:11 shahreyar-abeer

Hi, Thanks for the video. Is the renderUI necessary here? The title parameter was not thought to handle other elements than dashboardBrand. Using renderUI and textOutput adds extra HTML layers corrupting the layout.

DivadNojnarg avatar Dec 19 '22 13:12 DivadNojnarg