Closed mspanish closed 2 years ago
This was simple using the examples in your src folder, sorry I didn't look there first. The examples for sorting are here:
function itemSort(item1, item2, keywords) {
// sort by color order
return item1.order - item2.order
}
Added localSorting
option to disable local sorting.
Available in Version: 2.3.1
I have an array of 2000+ objects, sorted alphabetically by one of the fields. When I load my data into your autocomplete, it re-sorts the data. Is there a way to preserve the original sort order on a large dataset, or specify a field to sort by? I see your 2 functions dedicated to sorting but need an example to see how to get them to work. I don't really need re-sorting I just want the script to preserve my data as it is.
I also have an index id in the data which could be used to sort by, it also disregards this.