Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
shahreyar-abeer opened this issue Nov 9, 2022 · 1 comment

Comments

@shahreyar-abeer
Copy link

shahreyar-abeer commented Nov 9, 2022

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)
@DivadNojnarg
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants