What you describe sounds like it should work.
I've included a small app below for you to try. If you're still having issues, please reply with the smallest app you can provide that still produces your situation.
Thank you,
Barret
library(shiny)
ui <- fluidPage(
selectInput("myselect", "Label", c("A", "B", "C"), multiple = TRUE)
)
server <- function(input, output) {
len <- eventReactive(
input$myselect,
ignoreNULL = FALSE,
{
length(input$myselect)
}
)
observe({
cat("Length only: ", len(), "\n", sep = "")
})
observe({
cat(
"Length: ", len(), ". ",
"Choices: ", paste0(input$myselect, collapse = ", "),
"\n",
sep = ""
)
})
}
shinyApp(ui, server)