-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
The spinner cannot show properly in the first run #132
Comments
The first time you click "run" the DT is not present on screen, waiter cannot overlay anything, subsequent time it works fine. Consider this below if you want this to show all the time. library(DT)
library(shiny)
ui <- fluidPage(
useWaiter(),
actionButton("run", "RUN"),
div(
style = "min-height:400px",
id = "DTtest-container",
DTOutput("DTtest")
)
)
server <- function(input, output, session) {
wtr_test <- Waiter$new(id = "DTtest-container", html = spin_dots())
DT_result <- eventReactive(input$run, {
wtr_test$show()
on.exit({
wtr_test$hide()
})
Sys.sleep(5)
iris
})
output$DTtest <- renderDT(
DT_result()
)
}
shinyApp(ui, server) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was using
Waiter
to show a spinner before the results were calculated. But I encountered a problem that the waiter component didn't show when the data was calculated for the first time.The versions information of R and R packages I used are as follows:
To demonstrate the issue more clearly, I have prepared a shiny reprex below.
The text was updated successfully, but these errors were encountered: