Fix ascending/descending sort order in backgrid while clicking on the headers. Fixes #2303

This commit is contained in:
Khushboo Vashi 2017-03-28 09:19:24 -04:00 committed by Dave Page
parent 44ce8985e0
commit 8745417926

View File

@ -144,6 +144,15 @@
else
return 1;
}
else {
// if descending order, swap left and right
if (order === 1) t = l, l = r, r = t;
// compare as usual
if (l === r) return 0;
else if (l < r) return -1;
return 1;
}
};
}
});