title: reactive tabPanel in a navbarMenu with DT package
body: <p>I would like to create an simple app with reactive tabPanel/tabPanels which will depends on value in <code>selectInput</code> (I already found a solution <a href="https://stackoverflow.com/questions/19470426/r-shiny-add-tabpanel-to-tabsetpanel-dynamicaly-with-the-use-of-renderui/19470562#19470562">here</a>). Furthermore, after I choose one value in this widget I will see different number of tabPanels which also should work as a filter.
  E.g. in my app I use <code>diamonds</code> dataset. If I choose a word 'Very Good' I will see a dataset with all rows with this value. In the top of it I will also see all unique <code>color</code> values in filtered dataset. What I want to achieve is to get a possibility to filter once again using tabPanels above.</p>
  
  <pre><code>library(shiny)
  library(shinyTree)
  library(dplyr)
  library(DT)
  library(ggplot2)
  
  diamonds_test &lt;- sample_n(diamonds, 100)
  diam_cut &lt;- 
    list(
      `Very Good` = "Very Good",
      Ideal = "Ideal",
      Fair = "Fair",
      Premium = "Premium",
      Good = "Good"
    )
  
  runApp(list(
    ui = pageWithSidebar(
      headerPanel('Dynamic Tabs'),
      sidebarPanel(
        selectInput('name','',choices = diam_cut)
      ),
      mainPanel(
        uiOutput('mytabs'),
        dataTableOutput('table')
      )
    ),
    server = function(input, output, session){
  
      output$mytabs = renderUI({
        colorVector &lt;- diamonds_test %&gt;%
          filter(cut == input$name) %&gt;% 
          distinct(color) %&gt;% 
          .[['color']] %&gt;% 
          as.character()
  
        myTabs = lapply(colorVector, tabPanel)
        do.call(tabsetPanel, c(myTabs, type = 'pills'))
      })
  
      output$table &lt;- renderDataTable({
        data &lt;- diamonds_test %&gt;%
          filter(cut == input$name)
        datatable(data)
      })
    }
  ))
  </code></pre>