Selectize.js: Select same item/variable multiple times

Created on 15 Feb 2018  路  3Comments  路  Source: selectize/selectize.js

I did:

  • [X] Search for if my issue has already been submitted
  • [X] Make sure I'm reporting something precise that needs to be fixed
  • [X] Give my issue a descriptive and concise title
  • [x] Create a minimal working example on JsFiddle or Codepen
    (or gave a link to a demo on the Selectize docs)
  • [ ] Indicate precise steps to reproduce in numbers and the result,

I wonder if it is possible to select the same variable multiple times in selectizeInput window.

For example I use the following code in Shiny app:

output$select_color_variable <- renderUI({
varnames <- colnames(uploaded_data())
selectizeInput("selected_color_var",
label = "Select color var in data file",
choices = c("",varnames), multiple = TRUE, options=list(hideSelected=FALSE))
})

Expected result:

I want already selected items to be able to be selected again. So the desired output should be a vector of selected variables where some elements of a vector could be duplicated. I think this could be added as a parameter in options.

Actual result:

I can only select the same item once.

Most helpful comment

Hello mcavalletto! Thanks for the response.

I wonder if you plan to add this option in some future update? This option seems extremely useful to me. For example I wan't it to create pairs of two variables from two selectizeInput windows. Of course in this case variable can be repeated many times in different pairs.

All 3 comments

This is not possible with the current package and would require significant custom development. Good luck!

Hello mcavalletto! Thanks for the response.

I wonder if you plan to add this option in some future update? This option seems extremely useful to me. For example I wan't it to create pairs of two variables from two selectizeInput windows. Of course in this case variable can be repeated many times in different pairs.

closing stale issues older than one year.
If this issue was closed in error please message the maintainers.
All issues must include a proper title, description, and examples.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fadhilanugrah picture fadhilanugrah  路  4Comments

vilimco picture vilimco  路  5Comments

tr4g picture tr4g  路  4Comments

shoaibshakeel381 picture shoaibshakeel381  路  5Comments

John-Fratila picture John-Fratila  路  4Comments