title: How to set a conditional panel to a selectinput in shiny?
body: <p>I am trying to add a second  inputpanel in my shiny application which content depend on the input of the first inputpanel choice, I tried tout use condional panel with no luck.</p>
  
  <hr>
  
  <h1>ui.R</h1>
  
  <p>TO &lt;- read.csv("~/TO/TO/TO.csv", sep=";")
  library(shiny)</p>
  
  <p>shinyUI(fluidPage(</p>
  
  <p># Application title
    titlePanel("dasboard"),</p>
  
  <p># Sidebar with a slider input for number of bins</p>
  
  <p>sidebarLayout(</p>
  
  <pre><code>sidebarPanel(
    selectInput("country", label = h4("Pays"), 
                choices = levels(as.factor(TO$Pays))),
    conditionalPanel(
      condition = "input.country == 'Allemagne'",        
      selectInput("to", label = h4("Tour opérateur"), 
                choices = levels(as.factor(as.character(TO[as.character(TO$Pays)=="Allemagne",]$TO))))),
    conditionalPanel(
      condition = "input.country == 'Angleterre'",        
      selectInput("to", label = h4("Tour Operator"), 
                  choices = levels(as.factor(as.character(TO[as.character(TO$Pays)=="Angleterre",]$TO)))))
  </code></pre>
  
  <p>...</p>
  
  <hr>
  
  <p>The solution that I found is to create a conditionalPanel for every value of the first inputPanel But is the second inputPanel output is only correct for the first value.</p>
  
  <p>Does anyone have a solution?</p>