sorting done, ready to review
This commit is contained in:
parent
fa3ad2382b
commit
dbbda03020
|
@ -4900,12 +4900,10 @@ var sortedRemove = function sortedRemove(list, sortFn, item) {
|
||||||
};
|
};
|
||||||
|
|
||||||
function sortedIndexOf(list, value, sortFn) {
|
function sortedIndexOf(list, value, sortFn) {
|
||||||
if (sortFn === false) {
|
if (!sortFn) {
|
||||||
var i = 0;
|
sortFn = function sortFn(x) {
|
||||||
while (i < list.length && list[i].id !== value.id) {
|
return 0;
|
||||||
i++;
|
}; // This triggers the linear search for flows that have the same sort value.
|
||||||
}
|
|
||||||
return i;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var low = 0,
|
var low = 0,
|
||||||
|
|
|
@ -37,7 +37,7 @@ function makeSortFn(sort){
|
||||||
|
|
||||||
let sortKeyFun = column.sortKeyFun;
|
let sortKeyFun = column.sortKeyFun;
|
||||||
if (sort.sortDesc) {
|
if (sort.sortDesc) {
|
||||||
sortKeyFun = function () {
|
sortKeyFun = sortKeyFun && function () {
|
||||||
const k = column.sortKeyFun.apply(this, arguments);
|
const k = column.sortKeyFun.apply(this, arguments);
|
||||||
return _.isString(k) ? reverseString("" + k) : -k;
|
return _.isString(k) ? reverseString("" + k) : -k;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue