Skip to content

Can't add items to selectizeInput(multiple = TRUE) via mouse after multiple updates #3909

Closed

Description

@cpsievert

Introduced by #3875.

In the example below, items can't be added to the 1st input via mouse click (keyboard interaction works fine). Interestingly, if the "bar" update() gets removed and/or happens before the "foo" update, then the problem goes away

library(shiny)

ui <- fluidPage(
  div(
    style = "display:flex",
    selectizeInput("foo", NULL, letters, multiple = TRUE),
    selectizeInput("bar", NULL, letters, multiple = TRUE)
  )
)

server <- function(input, output, session) {
  
  observe({
    updateSelectizeInput(inputId = "foo", choices = letters[1:5])
    updateSelectizeInput(inputId = "bar", choices = letters[6:10])
  })
  
}

shinyApp(ui, server)

Activity

  1. added 2 commits that reference this issue on Oct 19, 2023
    8d896ce
    e93ecf0
  2. cpsievert commented on Oct 20, 2023

    @cpsievert
    CollaboratorAuthor

    Turns out this is due to bug in the latest version of selectize selectize/selectize.js#2058

  3. added 3 commits that reference this issue on Oct 20, 2023
    6863e93
    4dabc24
    a9a86f7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions