daattali / shinyjs

💡 Easily improve the user experience of your Shiny apps in seconds
https://deanattali.com/shinyjs
Other
734 stars 119 forks source link

delay() throws an error from rlang::hash #251

Closed bhogan-mitre closed 2 years ago

bhogan-mitre commented 2 years ago

Related to #248 I'm now getting an error with shinyjs::delay and I believe the algo parameter needs to be dropped.

  shinyApp(
    ui = fluidPage(
      useShinyjs(),
      p(id = "text", "This text will disappear after 3 seconds"),
      actionButton("close", "Close the app in half a second")
    ),
    server = function(input, output) {
      delay(3000, hide("text"))
      observeEvent(input$close, {
        delay(500, stopApp())
      })
    }
  )

Throws:

Error in rlang::hash(hashable, algo = "md5") : 
  unused argument (algo = "md5")
daattali commented 2 years ago

That's embarrassing, fixed thanks!

bhogan-mitre commented 2 years ago

No problem, thank you!