fabianlindfors / multi.js

A user-friendly replacement for select boxes with the multiple attribute enabled
https://fabianlindfors.se/multijs
MIT License
953 stars 76 forks source link

Added support for option subtitles #39

Closed psergi closed 4 years ago

psergi commented 4 years ago

I added the ability to include a subtitle below each of the options in the multi select.

The use-case is for example if you have an employee list where their name is the main option but you also want to include their email address to distinguish.

I updated the README as well as added a new example file.

Let me know what you think.

(It would be nice if the search matched off of the subtitle as well but I haven't dug into that yet.)

fabianlindfors commented 4 years ago

Hi!

Thank you so much for creating a PR. I really appreciate contributions. In this case, I don't think subtitles are a good fit for the core multi.js component. My philosophy has been to build a component that mimics the underlying functionality of the standard select element but improves the UX. As subtitles are not a built-in feature of select elements I'm opting to not make them part of multi.js either.

I hope you are on board with my reasoning. Thank you once again for creating a PR!