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
Tree does not render when modal is re-opened #79
Comments
In addition to re-rendering the tree when the modal is reopened, is there a way to also preserve the selected nodes when the modal is reopened? I am currently using a workaround that makes use of
So if you select node |
When input$tree changes, save the contents in "tree". The state is preserved in the structure. (The only thing that isn't saved is the types. I have code to fix that which I have not submitted yet) |
@bellma-lilly would you mind adding that logic to my reprex below? I've encountered the same error:
Thank you! |
As @m-merchant noted, you can get around this error, if you add |
Ah I see that now, thanks!!! |
The following app has a button,
Show
, that opens a modal dialog when clicked. The modal contains a shinyTree with the search feature enabled and a datatable. When the modal is opened for the first time, both the tree and the datatable are rendered:However, when the modal is dismissed and re-opened, the DT is rendered but the tree is not:
The screenshot above shows that the searchbox of the tree is rendered but its nodes are missing.
I can get around this by putting
input$show
insiderenderTree
but was wondering why it doesn't re-render without it like the DT.Here is the code to reproduce the above:
The text was updated successfully, but these errors were encountered: