waiter icon indicating copy to clipboard operation
waiter copied to clipboard

Waiter resize with toggle sidebar

Open LaFeh opened this issue 2 years ago • 1 comments

I am using the waiter package in a shinyApp with shinydashboardPLUS. The waiter-overlay does react to"standard" resizing events but not to the toggle-sidebar event that comes with shinydashboardPLUS.

It would be create if the width of the waiter overlay changed when the sidebar is toggled. Does anyone know a quick fix?

Here is a repex:

library(shiny)
library(waiter)
library(shinydashboardPlus)


ui <- dashboardPage(header=dashboardHeader(),
                    sidebar=dashboardSidebar(),
                    body=dashboardBody(useWaiter(), # include dependencies
                                actionButton("show", "Show loading for 3 seconds"),
                                div(id="load","hello"))

)

server <- function(input, output, session){
    
    observeEvent(input$show, {
        
        waiter_show( id="load",# show the waiter
            html = spin_fading_circles() # use a spinner
        )
        
        Sys.sleep(3) # do something that takes time
        
        waiter_hide() # hide the waiter
    })
    
}

shinyApp(ui, server)

LaFeh avatar May 12 '22 12:05 LaFeh

@divadNojnarg do you fire an event when this is resized?

JohnCoene avatar May 24 '22 15:05 JohnCoene