virtualSelectInput leads to an error in virtual-select JS when disabling only 1 option.
Reprex:
ui <- list(
shinyWidgets::virtualSelectInput(
inputId = "test",
label = "test",
choices = c("A" = "a", "B" = "b", "C" = "c"),
selected = "a",
disabledOptions = c("b", "c") # this works
# disabledOptions = "b" # this doesn't
)
)
server <- function(input, output, session) {}
shiny::shinyApp(ui, server)
This app produces the following output (just the label)
And a corresponding browser console error
I think the issue is the auto_unbox = TRUE in this line. With auto_unbox = FALSE the vector gets turned into an array which is what virtual-select expects.

virtualSelectInputleads to an error invirtual-selectJS when disabling only 1 option.Reprex:
This app produces the following output (just the label)
And a corresponding browser console error
I think the issue is the
auto_unbox = TRUEin this line. Withauto_unbox = FALSEthe vector gets turned into an array which is whatvirtual-selectexpects.