How does the global busy indicator introduced in Shiny 1.9 work?
I thought it should appear in the first 5 seconds in the following example:
library(bslib)
ui <- page_fillable(
useBusyIndicators(),
card(
card_header(
"A plot",
input_task_button("simulate", "Simulate"),
class = "d-flex justify-content-between align-items-center"
),
plotOutput("p")
)
)
server <- function(input, output) {
Sys.sleep(5)
output$p <- renderPlot({
if(input$simulate > 0){
Sys.sleep(4)
plot(x = rnorm(100), y = rnorm(100))
}
})
}
shinyApp(ui, server)