Shiny dashboardSidebar change when different tabItem selected
<p>I am having a following problem:</p>

<p>I want a sidebar change when I switch between tabItem(s).</p>

<pre><code>dashboardPage(
dasboardHeader(title = ""),
dashboardSidebar(
  sidebarMenu(
    menuItem("1", tabName = "1"),
    menuItem("2", tabName = "2")     
             ),
#I want this to be displayed when menuItem "1" is clicked
      tabsetPanel(
            tabPanel("t1", val="t1",
                    .... some inputs),
            tabPanel("t2", val="t2",
                    .... some inputs)
                 ),
 # This to be displayed when menuItem "2" is clicked    
      selectInput("s1", label="Select"....),
      selectInput("s2", label="Select2"...)
  )
dashboardBody(
 tabItem(tabName="1", 
      .......
   ),
 tabItem(tabName="2",
      ........
   )
 )
)
</code></pre>

<p>I have the dashboardBody changing when switching between the tabs but don't know how to change the dashboardSidebar values. Tried this inside the dashboardSidebar:</p>

<pre><code> conditionalPanel(
             condition="tabName='1'",
          #displaying first version of DashboardSidebar
             ),
 conditionalPanel(
             condition="tabName='2'",
          #displaying second version of DashboardSidebar
             )
</code></pre>

<p>But it didn't work for me.</p>

<p>Any ideas? </p>

<p>Thank you for your help.</p>