Assign an id to shinydashboard::dropdownMenu


Is there a way to assign an id to a shinydashboard::dropdownMenu?

When I code something along the line of

      type = 'tasks',
      id = 'something',
      icon = icon('tools'),

I get an error:
ERROR: Expected an object with class 'shiny.tag'


the documentation for shinydashboard doesnt seem to support this in a straightforward manner.
However there is a dropdownMenuOutput() you could place in your ui, whose sole param is the outputId. (therefore you would have an id of sorts for it).
The complication is that you would have to stipulate its contents by providing a renderMenu() in the server code for it like

output$id_of_my_menu <-renderMenu({
#the UI things it should contain
1 Like

Thanks @nirgrahamuk.

That worked.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.