JohnCoene / waiter

🕰️ Loading screens for Shiny
https://waiter.john-coene.com/
Other
499 stars 25 forks source link

waiter_hide_on_render no longer working #79

Closed PaulC91 closed 3 years ago

PaulC91 commented 3 years ago

Hey John!

I've been using the waiter_hide_on_render(id) function in the method shown below to hide the opening waiter screen only when a certain output is rendered. It was previously working well but after recently upgrading the package it appears to have stopped working, with the waiter_show_on_load screen never being hidden.

Any help appreciated and thanks for the package (and all your others!).

library(shiny)
library(echarts4r)
library(waiter)

ui <- fluidPage(
  use_waiter(), 
  waiter_show_on_load(spin_fading_circles()),
  waiter_hide_on_render("plot"),
  echarts4rOutput("plot")
)

server <- function(input, output, session){
  data <- data.frame(x = rnorm(10, 5, 3), y = rnorm(10, 50, 12), z = rnorm(10, 50, 5))

  output$plot <- renderEcharts4r({
    data %>% 
      e_charts(x) %>% 
      e_scatter(y) %>%
      e_scatter(z)
  })
}

shinyApp(ui, server)
JohnCoene commented 3 years ago

Thanks for bringing this up. I just pushed a fix to Github, let me know if it works as expected.

PaulC91 commented 3 years ago

Hi John. Thanks for the rapid response! Working well again now.