shinydashboard
shinydashboard copied to clipboard
double vertical scrollbar appears when tree view height is too long
I have a sidebar component which contains a few inputs making the height of the browser window potentially not tall enough. While I was expected the vertical scroll bar to overcome this, I have noticed a second vertical scrollbar appears , one for the body (maybe?) and another one to the page itself (see picture attached). I would have expected only one instead.
Can you provide a reproducible example?
Same issue here. I can reproduce it with many items in the sidebar:
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(),
dashboardSidebar(sidebarMenu(
lapply(paste0("menuItem_", 1:30), menuItem, tabName = "dashboard", icon = icon("dashboard"))
)),
dashboardBody()
)
server <- function(input, output) { }
shinyApp(ui, server)
This answer provided by erikrs92 works: https://github.com/almasaeed2010/AdminLTE/issues/1418
change:
.wrapper{height:100%;position:relative;overflow-x:hidden;overflow-y:auto}
to:
.wrapper{height:100%;position:relative;overflow-x:hidden;overflow-y:hidden}
inside: R-x.x.x\library\shinydashboard\AdminLTE\AdminLTE.min.css
Or add:
dashboardBody(tags$head(tags$style(
HTML('.wrapper {height: auto !important; position:relative; overflow-x:hidden; overflow-y:hidden}')
)))
to the app.
The issue is still there, but the workaround seems to do the job.
The issue is still there and event adding hidden
as suggested it does not work. Any other suggestions?
For me the using hidden
still works.