title: Filter one selectInput based on selection from another selectInput?
body: <p>I have two <code>selectInput</code>s, and I would like the selection in the first one (Brand) to change the possible selections in the second one (Candy).  So, for example, if someone chose "Nestle" in the first input box, then only Nestle candy bars will show up in the second box.  My data table has a column for Brand and a column for Candy bar type.  </p>
  
  <p>I have the following code to start, but this shows ALL of the choices, regardless of the selection.</p>
  
  <pre><code>selectInput(inputId="brand", 
                    label="Brand:",
                    choices=as.character
                    (unique(candyData$Brand)),
                    selected = "Nestle"
      ),
      selectInput(inputId="candy", 
                  label="Candy:",
                  choices=as.character
                  (unique(candyData$Candy)),
                  selected = "100Grand"
  </code></pre>
  
  <p>The dataset looks like the following:</p>
  
  <pre><code>Brand       Candy
  Nestle      100Grand
  Netle       Butterfinger
  Nestle      Crunch
  Hershey's   KitKat
  Hershey's   Reeses
  Hershey's   Mounds
  Mars        Snickers
  Mars        Twix
  Mars        M&amp;Ms
  </code></pre>
  
  <p><strong>Updated Question</strong>
  How do I update the ValueBox in my Dashboard based on the subsequent filtering?</p>
  
  <pre><code>output$count &lt;- renderValueBox({
  
      valueBox(
        value = nrow(candyData),
        subtitle = "Number of Candy Bars",
        icon = icon("table")
      )
    })
  </code></pre>