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

Waiter resize with toggle sidebar #122

Open
LaFeh opened this issue May 12, 2022 · 1 comment
Open

Waiter resize with toggle sidebar #122

LaFeh opened this issue May 12, 2022 · 1 comment

Comments

@LaFeh
Copy link

LaFeh commented May 12, 2022

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)
@JohnCoene
Copy link
Owner

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

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