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
updateTree() not working in shiny modules #84
Comments
Please leave this issue open, I will try to come with more details once I'm back to implementing this functionality in code. Thanks. |
Is this still an issue? |
I still see the issue with the current version of shinyTree from Master branch. Here is an example of an app with a shinyTree and an actionButton that should select all nodes. updateTree works without the module but doesn't do anything when used within the module. Please correct me if it is an error on my part using the module. With module (doesn't work)
Without module (works)
|
Try without |
Yes, that works. Thank you! |
Just to understand: how does updateTree() know the correct shiny context? It seems it does infer the correct namespace somehow. |
From my understanding, this is just normal shiny module magic, |
updateTree() is recommended to be used when node selection does not trigger
observeEvent(input$tree, {})
after the output is changed via renderTree.Unfortunately, at least for me, the same tree that draws well with renderTree() does not work with updateTree() because the displayed tree remains empty. This happens if run in a Shiny module.
My suspicion is that it is caused by the fact, that session is a different kind of object in a shiny module or because the given tree identifier does not match the one defined in the UI using the names namespace wrapper function
NS("id")("tree_id")
.I'm sorry I cannot be more verbose with an example but it should be straightforward to reproduce.
The text was updated successfully, but these errors were encountered: