alexurquhart / vue-bootstrap-typeahead

An autocomplete/typeahead component for Vue 2 and Bootstrap 4
https://alexurquhart.github.io/vue-bootstrap-typeahead/
MIT License
206 stars 157 forks source link

added sortMatches as a property #24

Open gamedevsteve opened 6 years ago

gamedevsteve commented 6 years ago

Added Attribute, sortMatches which accepts a boolean value so that you can override the Typeahead default sorting and use your own. Attribute defaults to true.

coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 41


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/components/VueBootstrapTypeaheadList.vue 11 12 91.67%
<!-- Total: 11 12 91.67% -->
Totals Coverage Status
Change from base Build 38: -0.8%
Covered Lines: 48
Relevant Lines: 70

💛 - Coveralls
mattzollinhofer commented 4 years ago

This is a solid PR! I think you may have inadvertently removed the filtering and highlighting matched text with this implementation.

Anyway, this repo isn't maintained any longer, but I'm actively maintaining a fork here: https://github.com/mattzollinhofer/vue-typeahead-bootstrap

If this is still an issue for you, I believe I have it fixed the sorting issue in the most recent release, give it a try! The config option to help with this is disableSort. The component will respect whatever order you provide!

https://www.npmjs.com/package/vue-typeahead-bootstrap

Hope that helps!