RinteRface / shinydashboardPlus

extensions for shinydashboard
https://shinydashboardplus.rinterface.com
Other
454 stars 77 forks source link

rapid collapse appearance/behaviour of box() inside of shinydashboardPlus::dashboardPage() #105

Closed DavidJesse21 closed 3 years ago

DavidJesse21 commented 3 years ago

I am using version 2.0.0.9000 of shinydashboardPlus. Using box(collapsible=TRUE) regardless wether it is shinydashboard::box() or shinydashboardPlus::box() inside of shinydashboard::dashboardPage() works fine in every way. While box(collapsible=TRUE) inside of shinydashboardPlus::dashboardPage() still works fine in most respects, collapsing the box is rapid and not smooth anymore. You can compare the behaviour in this example by switching between shinydashboard::dashboardPage and shinydashboardPlus::dashboardPage

library(shiny)
library(shinydashboard)
library(shinydashboardPlus)

ui <- shinydashboardPlus::dashboardPage(
  dashboardHeader(),
  dashboardSidebar(),
  dashboardBody(

    # collapsible box
    shinydashboardPlus::box(
      title = "A collapsible box",
      status = "primary",
      solidHeader = TRUE,
      width = 12,
      collapsible = TRUE,
      p("Some content...")
    )

  )
)

server <- function(input, output) { }

shinyApp(ui, server)
nvelden commented 3 years ago

I am experiencing exactly the same issue.

DivadNojnarg commented 3 years ago

See issue #69 for the cause. If you want to change the default animation speed (below super fast boxes):

library(shiny)
library(shinydashboard)
library(shinydashboardPlus)

ui <- shinydashboardPlus::dashboardPage(
  options = list(
    animationSpeed = 10
  ),
  dashboardHeader(),
  dashboardSidebar(),
  dashboardBody(

    # collapsible box
    shinydashboardPlus::box(
      title = "A collapsible box",
      status = "primary",
      solidHeader = TRUE,
      width = 12,
      collapsible = TRUE,
      p("Some content...")
    )

  )
)

server <- function(input, output) { }

shinyApp(ui, server)
nvelden commented 3 years ago

This does not fix the issue for me. I have the latest version (2.0.0).

DivadNojnarg commented 3 years ago

Could you reinstall and empty your web browser cache?

nvelden commented 3 years ago

That solved it thanks!