rstudio / shinydashboard

Shiny Dashboarding framework
https://rstudio.github.io/shinydashboard/
Other
892 stars 300 forks source link

double vertical scrollbar appears when tree view height is too long #255

Open dylancis opened 6 years ago

dylancis commented 6 years ago

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.

image

wch commented 6 years ago

Can you provide a reproducible example?

ismirsehregal commented 6 years ago

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)
ismirsehregal commented 6 years ago

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.

jonnyrobbie commented 5 years ago

The issue is still there, but the workaround seems to do the job.

cttlfsh commented 4 years ago

The issue is still there and event adding hidden as suggested it does not work. Any other suggestions?

ismirsehregal commented 4 years ago

For me the using hidden still works.