title: Show content for menuItem when menuSubItems exist in Shiny Dashboard
body: <p>Is there a way of actually showing content in the content pane of a Shiny Dashboard for a menuItem with existing menuSubItems. In the example: I tried to add "tabName = "charts"" to the menuItem "Charts" in order to show the content of tabItem "charts". However, no effect besides opening the menu and showing the submenu (the content pane still shows the "old" content of the previous selection): </p>
  
  <p><a href="https://i.stack.imgur.com/7cPEv.png" rel="noreferrer"><img src="https://i.stack.imgur.com/7cPEv.png" alt="enter image description here"></a></p>
  
  <p>
  <br/></p>
  
  <pre class="lang-r prettyprint-override"><code>header &lt;- dashboardHeader()
  #&gt; Error in dashboardHeader(): konnte Funktion "dashboardHeader" nicht finden
  
  sidebar &lt;- dashboardSidebar(
    sidebarUserPanel("User Name",
      subtitle = a(href = "#", icon("circle", class = "text-success"), "Online"),
      # Image file should be in www/ subdir
      image = "userimage.png"
    ),
    sidebarSearchForm(label = "Enter a number", "searchText", "searchButton"),
    sidebarMenu(
      # Setting id makes input$tabs give the tabName of currently-selected tab
      id = "tabs",
      menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")),
      menuItem("Widgets", icon = icon("th"), tabName = "widgets", badgeLabel = "new",
               badgeColor = "green"),
      menuItem("Charts", icon = icon("bar-chart-o"),
        menuSubItem("Sub-item 1", tabName = "subitem1"),
        menuSubItem("Sub-item 2", tabName = "subitem2")
      )
    )
  )
  #&gt; Error in dashboardSidebar(sidebarUserPanel("User Name", subtitle = a(href = "#", : konnte Funktion "dashboardSidebar" nicht finden
  
  body &lt;- dashboardBody(
    tabItems(
      tabItem("dashboard",
        div(p("Dashboard tab content"))
      ),
      tabItem("widgets",
        "Widgets tab content"
      ),
      tabItem("subitem1",
        "Sub-item 1 tab content"
      ),
      tabItem("subitem2",
        "Sub-item 2 tab content"
      )
    )
  )
  #&gt; Error in dashboardBody(tabItems(tabItem("dashboard", div(p("Dashboard tab content"))), : konnte Funktion "dashboardBody" nicht finden
  
  shinyApp(
    ui = dashboardPage(header, sidebar, body),
    server = function(input, output) { }
  )
  #&gt; Error in shinyApp(ui = dashboardPage(header, sidebar, body), server = function(input, : konnte Funktion "shinyApp" nicht finden
  
  
  devtools::session_info()
  #&gt; Session info -------------------------------------------------------------
  #&gt;  setting  value                       
  #&gt;  version  R version 3.4.0 (2017-04-21)
  #&gt;  system   x86_64, mingw32             
  #&gt;  ui       RTerm                       
  #&gt;  language (EN)                        
  #&gt;  collate  German_Germany.1252         
  #&gt;  tz       Europe/Berlin               
  #&gt;  date     2018-01-11
  #&gt; Packages -----------------------------------------------------------------
  #&gt;  package   * version    date       source                          
  #&gt;  backports   1.1.0      2017-05-22 CRAN (R 3.4.0)                  
  #&gt;  base      * 3.4.0      2017-04-21 local                           
  #&gt;  compiler    3.4.0      2017-04-21 local                           
  #&gt;  datasets  * 3.4.0      2017-04-21 local                           
  #&gt;  devtools    1.13.3     2017-08-02 CRAN (R 3.4.1)                  
  #&gt;  digest      0.6.13     2017-12-14 CRAN (R 3.4.3)                  
  #&gt;  evaluate    0.10.1     2017-06-24 CRAN (R 3.4.1)                  
  #&gt;  graphics  * 3.4.0      2017-04-21 local                           
  #&gt;  grDevices * 3.4.0      2017-04-21 local                           
  #&gt;  htmltools   0.3.6      2017-04-28 CRAN (R 3.4.0)                  
  #&gt;  knitr       1.17       2017-08-10 CRAN (R 3.4.1)                  
  #&gt;  magrittr    1.5        2014-11-22 CRAN (R 3.4.0)                  
  #&gt;  memoise     1.1.0      2017-04-21 CRAN (R 3.4.0)                  
  #&gt;  methods   * 3.4.0      2017-04-21 local                           
  #&gt;  Rcpp        0.12.14    2017-11-23 CRAN (R 3.4.3)                  
  #&gt;  rmarkdown   1.6        2017-06-15 CRAN (R 3.4.0)                  
  #&gt;  rprojroot   1.2        2017-01-16 CRAN (R 3.4.0)                  
  #&gt;  stats     * 3.4.0      2017-04-21 local                           
  #&gt;  stringi     1.1.5      2017-04-07 CRAN (R 3.4.0)                  
  #&gt;  stringr     1.2.0      2017-02-18 CRAN (R 3.4.0)                  
  #&gt;  tools       3.4.0      2017-04-21 local                           
  #&gt;  utils     * 3.4.0      2017-04-21 local                           
  #&gt;  withr       2.1.1.9000 2018-01-05 Github (jimhester/withr@df18523)
  #&gt;  yaml        2.1.14     2016-11-12 CRAN (R 3.4.0)
  </code></pre>