-
Notifications
You must be signed in to change notification settings - Fork 1
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
how open/close branches, and activate links from server side #3
Comments
I come somewhat closer. I can close menus. In this case if sub-sub branches of branch1 is open. I can close the sub branches by pressing the button. It is ofc not the overall intention to control via a button, but it would be an example of server side control of ShinyTreeMenu How do I choose if to open or close a menu.
|
ok realize that control of hiding/showing branches and subbranches is client side HTML / CSS only. e.g. /inst/www/shinyTreeMenu.css
the generated check boxes...
There is no function in shinyTreeMenu yet, that can open/close branches from server side. I suppose the most clean solution would be to make a function that takes a selected branch as input and send a javascript-snippet to be evaluated on client side. The javascript code should emulate the user has clicked one specific checkbox. Then all other server/client interactions could proceed as normal. |
Sorry for not getting back to you before now... But can see you figured it out yourself and no, you can directly open/close menus from shiny/server side. The way to do that would probably be using shinyJS to click ( That ought to work… Let me know how it goes? 😊 |
Hi Emil thanks for this lovely ShinyTreeMenu!!
I feel the documentation do not explain around how to open/close and activate tree links from server side.
I have attempted to do so with shinyjs::runjs(js_string2) however I see no visual change on client side.
The overall goal would be to manipulate the tree from somewhere else in a shiny app.
what am I missing?
best Soren
The text was updated successfully, but these errors were encountered: