shinydashboardPlus icon indicating copy to clipboard operation
shinydashboardPlus copied to clipboard

loadingState() will not stop

Open leungi opened this issue 4 years ago • 2 comments

Reproducible example below; read documentation, but can't find a way to turn off loadingState().

Expected: after 10 secs, spinner will fade away.

Outcome: plot renders after 10 secs, but spinner still shows

if (interactive()) {
  library(shiny)
  library(shinydashboard)
  library(shinydashboardPlus)
  shinyApp(
    ui = dashboardPage(
      dashboardHeader(),
      dashboardSidebar(),
      dashboardBody(
        box(
          title = "loading spinner",
          loadingState(),
          plotOutput("plot2")
        )
      ),
      title = "Loading State"
    ),
    server = function(input, output) {
      output$plot2 <- renderPlot({
        Sys.sleep(10)
        plot(iris)
      }) 
    }
  )
}

leungi avatar Jul 27 '19 18:07 leungi

This function is useless for some reasons:

  • no javascript bindings
  • there are better loaders (shinycssloaders, waiter, ...)

Expect this to be deleted in a near release

DivadNojnarg avatar Oct 07 '19 06:10 DivadNojnarg

Noted; thanks.

leungi avatar Oct 07 '19 13:10 leungi