Closed brianreavis closed 11 years ago
Hi Brian, Your tool is great and help me lot of time building custom select boxes. Thanks for the amazing widget.
I have one question on sorting multiple fields.
Below is the example code for your perusal.
Eg:
Initializing the sifter by multiple sort fields.
$("#sample").selectize({
create:false,
maxItems:1,
sort: [
{field: "value", direction: "asc"},
{field: "text", direction: "asc"}
]
});
Now if the user search, it should sort the searched text based on value ascending and text ascending order. But am able to get the desired result.
Can you see where the problem is?
Cheers mate..!
Fazeel
Add the ability to sort by multiple fields. The sort precedence will be based on the order of entries in the "sort" setting. Basic idea (the interface might vary):