I'm trying to manually expand a submenu in a sidebar in shiny dashboard. The updateTabItems function allows me to go to the tab, but it does not expand the menu with it.
I am looking for a reproducible answer to the question here:how to manually expand a submenu in a shiny dashboard side bar which includes a nice working example and answers which are however not implemented.
Here is a working code based on the referred answer. Please note that in this case the JavaScript uses the
tabName
as a selector to add theactive
class to the tree menu.