bs4Dash
bs4Dash copied to clipboard
Dynamic `dashboardBrand` does not collapse with the `sidebarMenu` with `fixed=T & minified=F`
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.
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)
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.