rstudio / shinydashboard

Shiny Dashboarding framework
https://rstudio.github.io/shinydashboard/
Other
892 stars 300 forks source link

Let tabItems() accept a list of "shiny.tag" objects #254

Open DaniMori opened 6 years ago

DaniMori commented 6 years ago

Let tab.list be a list of objects of class "shiny.tag", being each one a tab item, e.g. returned by a call to tabItem().

The way of programatically generating a set of tabs right now is by executing the command

do.call(tabItems, tab.list)

Similarly to sidebarMenu(), I'd like to request tabItems() to have a .list argument, which accetps a list of shiny.tab objects.

geoabi commented 6 years ago

One trick to overcome this problem in the meanwhile is to use a div with class= "tab-content" instead of using the tabItems function. That's what the function returns.

So instead of:

tabItems(tab.list)

Use:

div(class= "tab-content", tab.list)