I have a Shiny-app where you can create groups and subgroups from a dataframe. Because I cannot know in in advance how many groups there will be, I also create buttons and observe-Events dynamically that allow the user to rename/delete buttons. An example would be: The user works on the iris-data and decides to make three groups: Setosa with small Petal.Length, Setosa with big Petal.Length and the rest.
Now to my problem: I also want to make it possible to save and load workflows, so that you create a predefined set of groups with their corresponding buttons (with events). Is there a way to detect all observeEvents in Shiny, so I can destroy them if they belong to no longer existing groups? I would like to do the logic for that in the R-world, but also a JS-command to get all callbacks would be highly appreciated.
Just in case you are wondering: I give meaningful names to my observeEvents so I can distinguish my custom-callbacks from other callbacks that are also present in my shinyapp.
I hope I could make clear what I mean! Please do not hesitate to ask me if there are any questions.