Pager: filtered rows now equals total rows when ajaxProcessing returns an array. Fixes #667

This commit is contained in:
Mottie 2014-07-02 15:43:15 -05:00
parent 0b380ad323
commit 6ece2fe6b4
2 changed files with 6 additions and 2 deletions

View File

@ -306,10 +306,12 @@
// 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;
// can't set filtered rows when returning an array
p.filteredRows = p.totalRows;
d = p.totalRows === 0 ? [""] : result[t ? 0 : 1] || []; // row data
th = result[2]; // headers
}
l = d.length;
l = d && d.length;
if (d instanceof jQuery) {
if (p.processAjaxOnInit) {
// append jQuery object

View File

@ -508,10 +508,12 @@ 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;
// can't set filtered rows when returning an array
p.filteredRows = p.totalRows;
d = p.totalRows === 0 ? [""] : result[t ? 0 : 1] || []; // row data
th = result[2]; // headers
}
l = d.length;
l = d && d.length;
if (d instanceof jQuery) {
if (wo.pager_processAjaxOnInit) {
// append jQuery object