Choices-js / Choices

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

#926: Maintain groups in search mode #1152

Open stefan-korn opened 3 months ago

stefan-korn commented 3 months ago

Description

Proposal for solving #926 Add a new bool config option "appendGroupInSearch". If this is set to true the group of an option will be appended to the name of the option when searching.

This is somehow a workaround, because I was not able at this moment to keep the goups like in the inital state when not searching.

But at least this should help if you have the same label for options in different groups.

Remark: to run a build of the project I needed to remove the bundlesize library. This does at least not seem to work with latest (later) node version, because it requires very old (0.1.0) version of brotli-size and this requires deprecated iltorb package. Did not commit changes to package.json/package-lock.json though.

Screenshots (if appropriate)

choices_screen (the group City/State appended to the choice New York/Nevada/Pennsylvania)

Types of changes

Checklist