Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duplicateItemsAllowed not working #1123

Closed
alicericci opened this issue Jun 15, 2023 · 1 comment
Closed

duplicateItemsAllowed not working #1123

alicericci opened this issue Jun 15, 2023 · 1 comment
Labels
bug documentation Pull request that changes documentation

Comments

@alicericci
Copy link

alicericci commented Jun 15, 2023

It's not possible to select the same items twice dispite duplicateItemsAllowed default being true.

  <select multiple>
    <option value="Choice 1">Choice 1</option>
    <option value="Choice 2">Choice 2</option>
    <option value="Find me">Choice 3</option>
    <option value="Choice 4">Choice 4</option>
  </select> 
const element = document.querySelector('select');
const choices = new Choices(element, {
  editItems: true,
  renderSelectedChoices: "always",
});

Expected behavior
When clicked, Choice 2 is added to the list even if it's already selected

Screenshot 2023-06-15 at 15 07 08
@alicericci alicericci added the bug label Jun 15, 2023
Xon added a commit that referenced this issue Aug 10, 2024
@Xon
Copy link
Collaborator

Xon commented Aug 10, 2024

This is a documentation issue, as duplicateItemsAllowed only works with text and not select-multiple

@Xon Xon closed this as completed Aug 10, 2024
@Xon Xon added the documentation Pull request that changes documentation label Aug 10, 2024
@Xon Xon mentioned this issue Aug 22, 2024
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug documentation Pull request that changes documentation
Projects
None yet
Development

No branches or pull requests

2 participants