mirror of
https://github.com/Mottie/tablesorter.git
synced 2025-01-12 15:24:21 +00:00
pager will now update when ajax returns no rows. Fixes #456
This commit is contained in:
parent
bada08ef64
commit
ebe8dd8acb
@ -271,7 +271,7 @@
|
||||
//ensure a zero returned row count doesn't fail the logical ||
|
||||
rr_count = result[t ? 1 : 0];
|
||||
p.totalRows = isNaN(rr_count) ? p.totalRows || 0 : rr_count;
|
||||
d = result[t ? 0 : 1] || []; // row data
|
||||
d = p.totalRows === 0 ? [] : result[t ? 0 : 1] || []; // row data
|
||||
th = result[2]; // headers
|
||||
}
|
||||
l = d.length;
|
||||
|
@ -457,7 +457,7 @@ tsp = ts.pager = {
|
||||
//ensure a zero returned row count doesn't fail the logical ||
|
||||
rr_count = result[t ? 1 : 0];
|
||||
p.totalRows = isNaN(rr_count) ? p.totalRows || 0 : rr_count;
|
||||
d = result[t ? 0 : 1] || []; // row data
|
||||
d = p.totalRows === 0 ? [] : result[t ? 0 : 1] || []; // row data
|
||||
th = result[2]; // headers
|
||||
}
|
||||
l = d.length;
|
||||
|
Loading…
Reference in New Issue
Block a user