Hi guys, I have to sort a datatable by two properties. I found only how to sort by one parameter.
here is dirty implementation
https://snippet.webix.com/fy9z4daa
to see the result better, firstly sort by rating
Just wait a week - we are going to include multi-column sorting for Datatable into the upcoming 7.2 release.
Thanks, okay. I implemented in this way:
sortByBitOffset(a, b) {
let stA = a.startAddress;
let stB = b.startAddress;
a = a.bitOffset;
b = b.bitOffset;
return (stA > stB || a > b) ? 1 : (stA < stB || a < b ? -1 : 0);
}