New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make runcodeUI() work inside Shiny modules #184
Comments
I did take deliberate steps to ensure every shinyjs functionality that I think needs to support modules will support them. Can you elaborate on why this feature needs to ever be in a module though? It's not meant to be used in multiple places in your code, it's meant as a simple tool you place in your app while developing for debugging purposes. By making it support modules I think it might make it seem more robust than it really should be. |
I organize large parts of my apps in modules, and to be able to use As an aside, using But I know it is intended for debugging purposes and understand your concerns about robustness - I see how this could potentially invite unintended uses and lead to problems for some users. |
Would you like to submit a PR? |
This has been implemented |
Hi @daattali ,
I have been using shinyjs happily for a while and really like all the functionality it adds.
I noticed that
runcodeServer()/runcodeUI
combo doesn't work when called inside of Shiny modules. I could make it work by changing theruncodeUI
code like this, essentially just adding an id argument that can be ignored in everyday use but can be adjusted to reflect Module namespace, and the typicalshiny::NS()
call.I first thought this would be kind of a fringe use case but now I think it can be pretty useful to run code in the Module scope from the app, and this change shouldn't break anything.
Cheers,
Max
The text was updated successfully, but these errors were encountered: