shentao / vue-multiselect

Universal select/multiselect/tagging component for Vue.js
https://vue-multiselect.js.org/
MIT License
6.69k stars 988 forks source link

Rationale behind sorting filtered options #1763

Open thomaspaillot opened 5 months ago

thomaspaillot commented 5 months ago

https://github.com/shentao/vue-multiselect/blob/f424a49bebfb8368e53bb35428ffa30d11ae8967/src/multiselectMixin.js#L20-L24

I would like to understand the rationale behind the sort mechanism of the filtered options. As I understand it, it is sorted by the option label length, it seems to me that this is quite an opiniated choice that will not produce good result in every cases. Would you be willing to introduce a new prop to provide a custom sort function or to remove the sort?

dorep commented 4 months ago

We have noticed the "issue". Can you please provide us with the option to NOT sort by length?

zigcBenx commented 4 months ago

It would be incredibly helpful if someone could implement prop for altering sorting mechanism. :pray: