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

Maximizing tabBox with a sidebar will add a horizontal Scrollbar to the box #383

Closed
fsalemi opened this issue Feb 24, 2022 · 3 comments
Closed

Comments

@fsalemi
Copy link

fsalemi commented Feb 24, 2022

I am using a sidebar inside a box in shinyDashboard, which is working perfectly. However when I maximize the box, it will add an unnecessary horizontal scrollbar to the box. I tried disabling it with the following CSS style code:

tags$style("body {overflow-x: hidden !important; }")

But it does not work. Does anyone know how to remove the scrollbar?
Here is a simple reproducible code:

# Toggle a box sidebar
library(shiny)
library(bs4Dash)

shinyApp(
  ui = dashboardPage(
    header = dashboardHeader(),
    body = dashboardBody(
      tags$style("body {overflow-x: hidden !important; }"),
      box(
        height = "500px",
        width = 12,
        maximizable = T,
        solidHeader = FALSE,
        collapsible = TRUE,
        sidebar = boxSidebar(
          id = "mycardsidebar",
          width = 30,
          p("Sidebar Content")
        )
      )
    ),
    sidebar = dashboardSidebar()
  ),
  server = function(input, output, session) {}
)

Any help would be highly appreciated.

@YongbingDing
Copy link

YongbingDing commented Feb 24, 2022 via email

@fsalemi
Copy link
Author

fsalemi commented Feb 24, 2022

Thanks Ding Yongbing.

@fsalemi
Copy link
Author

fsalemi commented Feb 25, 2022

This issue is resolved.

@fsalemi fsalemi closed this as completed Feb 25, 2022
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