alexurquhart/vue-bootstrap-typeahead

Cannot control the order of the results

Opened this issue · 2 comments

Currently I use a watcher method which does some complicated search and provides array of results in a beautiful order (based on my custom priority). But when results are displayed in the popup - they are ordered in some internal order, which is weird.
It would be great to be able to just provide array of objects with my ordering and be able to see them in the same order in popup.

Nowi5 commented

Does it work by sorting via backend API?

I agree this is an issue!

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

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