title: R Shiny - updateSelectInput and updateSelectizeInput on choices not working
body: <p>In my ui.R I have a uiOutput and a button that allows me to add selectInput at will on a click.
  The possible choices of these selectInput are the same, so when you have two selectInput, the update of one affects the choices on the other.
  The problem I have is that I can't update the choices on selectInput after an update on a selectInput. Here is the code.</p>
  
  <p>In Ui.R</p>
  
  <pre><code>div(id="inference_species_group_div",
    box(h5(strong(uiInferenceSpeciesGroup)), width = "100%",
      fluidRow(
        column(width = 6, id = "inference_species_group_inputs_col",
          uiOutput("inf_par_sp_group_output_1")
        )
      ),
      br(),
      fluidRow(
        column(width = 12, id = "inference_species_group_add_input_col",
               actionButton("inference_species_group_add_input_btn", uiInferenceSpeciesGroupAdd, icon = icon("plus"))
        )
      )
    )
  )
  </code></pre>
  
  <p>in server.R</p>
  
  <pre><code>observeEvent(input$inference_species_group_add_input_btn, {
    addInfParSpGroupAdd()
  })
  
  addInfParSpGroupAdd &lt;- function(){
    InfParSpGpInd &lt;&lt;- InfParSpGpInd + 1
    output[[paste0("inf_par_sp_group_output_", InfParSpGpInd)]] &lt;- renderUI({
      list(
        fluidRow(
          column(width=8, 
                 selectInput(paste0("inf_par_sp_group_select_", InfParSpGpInd), 
                    label=paste0(uiInferenceSpeciesGroupInputLabel, ""),
                    multiple=T, choices = InfParSpGpListSp, selected = NULL
                 )
          ),
          column(width=1, id=paste0("inf_par_sp_group_rmv_col_", InfParSpGpInd),
                 actionButton(paste0("inf_par_sp_group_rmv_btn_", InfParSpGpInd), "", icon = icon("times"),
                    onclick = paste0("Shiny.onInputChange('removeGroupSpecies', ", InfParSpGpInd, ")")
                 )
          ),
          tags$style(type='text/css', paste0("#inf_par_sp_group_rmv_col_", InfParSpGpInd, " {padding-top:4%}"))
        ),
        uiOutput(paste0("inf_par_sp_group_output_", (InfParSpGpInd + 1)))
      )
    })
    observeEvent(input[[paste0("inf_par_sp_group_select_", InfParSpGpInd)]], {
      selectedInInput = input[[paste0("inf_par_sp_group_select_", InfParSpGpInd)]]
      InfParSpGpListSp &lt;&lt;- InfParSpGpListSp [! InfParSpGpListSp %in% selectedInInput]
      rebindGroupSpeciesInputs()
    })
  }
  
  observeEvent(input$removeGroupSpecies, {
    i = input$removeGroupSpecies
    selectedInInput = input[[paste0("inf_par_sp_group_select_", i)]]
    output[[paste0("inf_par_sp_group_output_", i)]] &lt;- renderUI({
      uiOutput(paste0("inf_par_sp_group_output_", (i + 1)))
    })
    if (!is.null(selectedInInput) &amp;&amp; length(selectedInInput) &gt; 0){
      InfParSpGpListSp &lt;&lt;- c(InfParSpGpListSp, selectedInInput)
      rebindGroupSpeciesInputs()
    }
  })
  
  rebindGroupSpeciesInputs &lt;- function(){
    for (i in 1:InfParSpGpInd){
      if (!is.null(input[[paste0("inf_par_sp_group_select_", i)]])){
        updateSelectInput(session, input[[paste0("inf_par_sp_group_select_", i)]], choices = InfParSpGpListSp)
      }
    }
  }
  </code></pre>
  
  <p>In this line, </p>
  
  <pre><code>updateSelectInput(session, input[[paste0("inf_par_sp_group_select_", i)]], choices = InfParSpGpListSp)
  </code></pre>
  
  <p>the value of <code>InfParSpGpListSp</code> is what it should be, but the selectInput/selectizeInput does not update the list of choices.</p>