shinydashboard icon indicating copy to clipboard operation
shinydashboard copied to clipboard

double vertical scrollbar appears when tree view height is too long

Open dylancis opened this issue 6 years ago • 6 comments

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

dylancis avatar Jan 05 '18 12:01 dylancis

Can you provide a reproducible example?

wch avatar Jan 05 '18 18:01 wch

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 avatar Feb 26 '18 13:02 ismirsehregal

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.

ismirsehregal avatar Feb 26 '18 15:02 ismirsehregal

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

jonnyrobbie avatar May 27 '19 09:05 jonnyrobbie

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

cttlfsh avatar Apr 26 '20 08:04 cttlfsh

For me the using hidden still works.

ismirsehregal avatar Apr 26 '20 09:04 ismirsehregal