title: Create an input variable that is dependent on another input variable in flexdashboard shiny widget
body: <p>I am trying to create a user input in flexdashboard that is dependent on another user input. Example dataset: alphabet_data &lt;- read.table(
          text = "Alphabet       Number
          ABC       1
          DEF       4
          ABD       5
          ABC       2
          ABC       3
          ABD       6
          ABD       7
          ABD       8",
          header = TRUE,
          stringsAsFactors = FALSE)</p>
  
  <p>User selects "alphabet" in selectizeInput, say ABD, based on that I want the user to get the selectizeInput options for "number" to only to be shown 5,6,7,8.</p>
  
  <ol>
  <li>I tried observeEvent on "alphabet", to create the new dependent input fresh</li>
  <li>I created the dependent input "number" with NULL choices, and used observe event to updateselectizeInput.</li>
  <li>I created a new table based on alphabet choice, and then used that table within reactive to create "number" input.</li>
  <li>There's code below to reproduce the issue.</li>
  </ol>
  
  <hr>
  
  <p>title: "Untitled"
  output: 
    flexdashboard::flex_dashboard:
      orientation: columns
      vertical_layout: fill</p>
  
  <h2>runtime: shiny</h2>
  
  <pre><code>library(flexdashboard)
  library(tidyverse)
  </code></pre>
  
  <pre><code>alphabet_data &lt;- read.table(
          text = "Alphabet       Number
          ABC       1
          DEF       4
          ABD       5
          ABC       2
          ABC       3
          ABD       6
          ABD       7
          ABD       8",
          header = TRUE,
          stringsAsFactors = FALSE)
  </code></pre>
  
  <h2>Column {.sidebar data-width=650}</h2>
  
  <h3>Chart A</h3>
  
  <pre><code>
  selectizeInput(
      inputId  = "alphabet",
      label    = "Alphabet",
      choices  = unique(alphabet_data$Alphabet),
      multiple = TRUE,
      options  = list(maxItems = 2)
  )
  
  selectizeInput(
          inputId  = "number",
          label    = "Number",
          choices  = NULL,
          multiple = TRUE,
          options  = list(maxItems = 2)
  )
  
  selected_alphabet &lt;- eventReactive(
      eventExpr = input$alphabet,
  
      valueExpr = {
      alphabet_data %&gt;% 
              filter(Alphabet %in% input$alphabet)
  })
  
  reactive({
      observeEvent(
          eventExpr   = input$alphabet,
          handlerExpr = {
              updateSelectizeInput(
                  inputId = "number",
                  choices = selected_alphabet()$number
              )
          }
      )
  })
  
  
  </code></pre>
  
  <h2>Column {data-width=350}</h2>
  
  <h3>Chart B</h3>
  
  <pre><code>output$alphabet &lt;- renderPrint(input$alphabet)
  textOutput(outputId = "alphabet")
  </code></pre>
  
  <h3>Chart C</h3>
  
  <pre><code>renderPrint(selected_alphabet())
  </code></pre>
  
  <h3>Chart D</h3>
  
  <pre><code>output$number &lt;- renderPrint(input$number)
  textOutput(outputId = "number")
  </code></pre>
  
  <p>I expect when the user select ABD alphabet, the options for number to showcase as 5,6,7,8.</p>