pager will now update when ajax returns no rows. Fixes #456

This commit is contained in:
Mottie 2013-12-11 16:44:24 -06:00
parent bada08ef64
commit ebe8dd8acb
2 changed files with 2 additions and 2 deletions

View File

@ -271,7 +271,7 @@
//ensure a zero returned row count doesn't fail the logical || //ensure a zero returned row count doesn't fail the logical ||
rr_count = result[t ? 1 : 0]; rr_count = result[t ? 1 : 0];
p.totalRows = isNaN(rr_count) ? p.totalRows || 0 : rr_count; 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 th = result[2]; // headers
} }
l = d.length; l = d.length;

View File

@ -457,7 +457,7 @@ tsp = ts.pager = {
//ensure a zero returned row count doesn't fail the logical || //ensure a zero returned row count doesn't fail the logical ||
rr_count = result[t ? 1 : 0]; rr_count = result[t ? 1 : 0];
p.totalRows = isNaN(rr_count) ? p.totalRows || 0 : rr_count; 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 th = result[2]; // headers
} }
l = d.length; l = d.length;