Choices-js / Choices

A vanilla JS customisable select box/text input plugin ⚡️
https://choices-js.github.io/Choices/
MIT License
6.25k stars 617 forks source link

Allow limiting the amount of choices previewed in multiselect. #1195

Open MaximMitrofanov opened 2 months ago

MaximMitrofanov commented 2 months ago

Is your feature request related to a problem? Please describe. I'm always fruastrated when I can't limit the amount of items selected that are rendered.

Describe the solution you'd like I'd like an option in the Options object that allows me to limit the amount of items that are displayed to the user, meaning that when a user chooses 3 options and the limit is set to 2 it will display the next things, Option 1, Option 2, and 1 more.

Describe alternatives you've considered Attach to the events and do it myself through event callbacks

Additional context If it's added then another string should be translateable, additionalItems: (value) => and ${value} more.

Saichandra2520 commented 2 months ago

Anyone is working on this? i want to work on this issue ! @MaximMitrofanov