Fix pager update when ajax returns no rows. Fixes #456

This commit is contained in:
Mottie 2013-12-15 04:49:55 -06:00
parent 173db948c6
commit eb13fb4b14
2 changed files with 2 additions and 2 deletions

View File

@ -272,7 +272,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 = p.totalRows === 0 ? [] : result[t ? 0 : 1] || []; // row data
d = p.totalRows === 0 ? [""] : result[t ? 0 : 1] || []; // row data
th = result[2]; // headers
}
l = d.length;

View File

@ -458,7 +458,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 = p.totalRows === 0 ? [] : result[t ? 0 : 1] || []; // row data
d = p.totalRows === 0 ? [""] : result[t ? 0 : 1] || []; // row data
th = result[2]; // headers
}
l = d.length;