JohnCoene / cicerone

🏛️ Give tours of your Shiny apps
https://cicerone.john-coene.com
Other
187 stars 7 forks source link

Resetting Inputs on "Close" or "Done" #25

Closed KoderKow closed 3 years ago

KoderKow commented 3 years ago

Hello! I am updating a few inputs during a guide. I have allow_close = FALSE and would like to reset the inputs I change during the tour back to NULL if the "Close" or "Done" is clicked. Is there any input$... available that I can use observeEvent() on that I am not aware of? Or is there another recommended approach?

Thanks!

JohnCoene commented 3 years ago

I just added an event for this, after installing the latest version from Github the following code should work.

observeEvent(input$cicerone_reset, {
    print("Done")
  })
KoderKow commented 3 years ago

Perfect! Wow, thank you for the super-fast response and solution! Appreciate it!