Thanks for your suggestion!
In my case this is a solution I can work with.
Still I wonder why the function is not consistent.
If the param server in updateSelectizeInput is FALSE you can change a selectizeInput to support multiple from the server by setting the options parameter. If set to TRUE, it is not possible. See this example:
library(shiny)
ui <- fluidPage(
selectizeInput(
inputId = "name",
label = "Select Name:",
choices = NULL,
multiple = FALSE
)
)
server <- function(input, output, session) {
updateSelectizeInput(
inputId = "name",
choices = c("Markus", "Lisa", "Peter"),
# changes 'multiple' param in selectizeInput to TRUE
options = list(maxItems = 10),
# if server = TRUE, changing 'multiple' param is not possible anymore
# server = TRUE
)
}
shinyApp(ui, server)
In your solution the multiple output stays multiple in a way (no dropdown symbol on the right). Im my case that is fine but I can think of cases where you want a "real" single-select dropdown.