Choices-js / Choices

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

Add matches for highlight support #1122

Open BrayanCaro opened 1 year ago

BrayanCaro commented 1 year ago

I love the project, and I have a suggestion: since we populate the fuse results with their matches, I think that choices could bring those indexes for highlight support.

https://github.com/Choices-js/Choices/blob/5dbea2825a5887d88d6947443f4874bb7b84cc3a/src/scripts/choices.ts#L1335

And I think this would affect the Choices interface by adding the attribute and the type