mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Fixed sortReset bug - issue #167
This commit is contained in:
parent
4336c5d74a
commit
fa419d7db9
@ -454,8 +454,7 @@
|
||||
}
|
||||
|
||||
function updateHeaderSortCount(table, list) {
|
||||
var s, o, c = table.config,
|
||||
l = c.headerList.length,
|
||||
var s, t, o, c = table.config,
|
||||
sl = list || c.sortList;
|
||||
c.sortList = [];
|
||||
$.each(sl, function(i,v){
|
||||
@ -465,7 +464,8 @@
|
||||
o = c.headerList[s[0]];
|
||||
if (o) { // prevents error if sorton array is wrong
|
||||
c.sortList.push(s);
|
||||
o.count = s[1] % (c.sortReset ? 3 : 2);
|
||||
t = $.inArray(s[1], o.order); // fixes issue #167
|
||||
o.count = t >= 0 ? t : s[1] % (c.sortReset ? 3 : 2);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user