diff --git a/addons/pager/jquery.tablesorter.pager.js b/addons/pager/jquery.tablesorter.pager.js index 11c489f5..a6f8bc93 100644 --- a/addons/pager/jquery.tablesorter.pager.js +++ b/addons/pager/jquery.tablesorter.pager.js @@ -495,8 +495,8 @@ // making the next if comparison think the filters are different (joined by commas). Fixes #202. l.currentFilters = (l.currentFilters || []).join('') === '' ? [] : l.currentFilters; p.currentFilters = (p.currentFilters || []).join('') === '' ? [] : p.currentFilters; - // don't allow rendering multiple times on the same page/size/totalpages/filters/sorts - if ( l.page === p.page && l.size === p.size && l.totalPages === p.totalPages && + // don't allow rendering multiple times on the same page/size/totalRows/filters/sorts + if ( l.page === p.page && l.size === p.size && l.totalRows === p.totalRows && (l.currentFilters || []).join(',') === (p.currentFilters || []).join(',') && l.sortList === (c.sortList || []).join(',') ) { return; } if (c.debug) { @@ -507,7 +507,7 @@ size : p.size, // fixes #408; modify sortList otherwise it auto-updates sortList : (c.sortList || []).join(','), - totalPages : p.totalPages, + totalRows : p.totalRows, currentFilters : p.currentFilters || [] }; if (p.ajax) { diff --git a/js/widgets/widget-pager.js b/js/widgets/widget-pager.js index 3dbd77cd..8988511b 100644 --- a/js/widgets/widget-pager.js +++ b/js/widgets/widget-pager.js @@ -691,8 +691,8 @@ tsp = ts.pager = { // making the next if comparison think the filters as different. Fixes #202. l.currentFilters = (l.currentFilters || []).join('') === '' ? [] : l.currentFilters; p.currentFilters = (p.currentFilters || []).join('') === '' ? [] : p.currentFilters; - // don't allow rendering multiple times on the same page/size/totalpages/filters/sorts - if ( l.page === p.page && l.size === p.size && l.totalPages === p.totalPages && + // don't allow rendering multiple times on the same page/size/totalRows/filters/sorts + if ( l.page === p.page && l.size === p.size && l.totalRows === p.totalRows && (l.currentFilters || []).join(',') === (p.currentFilters || []).join(',') && l.sortList === (c.sortList || []).join(',') ) { return; @@ -705,7 +705,7 @@ tsp = ts.pager = { size : p.size, // fixes #408; modify sortList otherwise it auto-updates sortList : (c.sortList || []).join(','), - totalPages : p.totalPages, + totalRows : p.totalRows, currentFilters : p.currentFilters || [] }; if (p.ajax) {