In case anyone is interested here is an example of server-side selectize inside a modal. Again I'm not sure this is the best approach but it works!
library(shiny)
library(dplyr)
baby_names <- babynames::babynames %>%
distinct(name) %>%
pull(name) %>%
sort()
ui <- fluidPage(
actionButton("show", "Show modal dialog"),
verbatimTextOutput("selections")
)
server <- function(input, output, session) {
observeEvent(input$show, {
updateSelectizeInput(session, "babyname", choices = baby_names, selected = input$babyname, server = TRUE)
showModal(modalDialog(selectInput("babyname", "Baby Name", multiple = TRUE, choices = character(0))))
})
output$selections <- renderText(input$babyname)
}
shinyApp(ui, server)