datasketch / shinypanels

Collapsible panels layout for r shiny apps
Other
80 stars 11 forks source link

modalButton doesn't work (trigger's modal) when rendered from within the server (not in the ui) #79

Closed brazadas closed 4 years ago

brazadas commented 4 years ago

I think this has to do with running timing: when the js script that defines all the shinypanels' modalbuttons (buttons or a tags with the class "modal-trigger") behaviour is executed, the modalButtons rendered from within the server don't exist yet so they aren't "taken into account" when the click event listeners are created, this meaning they don't do what is expected. I tried some of shiny js events such as sessioninitialized, connected but I couldn't make it work... but maybe this or some usage of setTimeout