Skip to content

Commit

Permalink
Core & pager: Change pager removeRows check. Closes #1525 & #1466
Browse files Browse the repository at this point in the history
  • Loading branch information
Mottie committed Mar 18, 2018
1 parent 7b15ec9 commit 17a8b2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions js/jquery.tablesorter.js
Original file line number Diff line number Diff line change
Expand Up @@ -1473,7 +1473,6 @@
appendCache : function( c, init ) {
var parsed, totalRows, $tbody, $curTbody, rowIndex, tbodyIndex, appendTime,
table = c.table,
wo = c.widgetOptions,
$tbodies = c.$tbodies,
rows = [],
cache = c.cache;
Expand All @@ -1496,7 +1495,7 @@
for ( rowIndex = 0; rowIndex < totalRows; rowIndex++ ) {
rows[rows.length] = parsed[ rowIndex ][ c.columns ].$row;
// removeRows used by the pager plugin; don't render if using ajax - fixes #411
if ( !c.appender || ( c.pager && ( !c.pager.removeRows || !wo.pager_removeRows ) && !c.pager.ajax ) ) {
if ( !c.appender || ( c.pager && !c.pager.removeRows && !c.pager.ajax ) ) {
$curTbody.append( parsed[ rowIndex ][ c.columns ].$row );
}
}
Expand Down
3 changes: 3 additions & 0 deletions js/widgets/widget-pager.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@
setPage: wo.pager_startPage
}, c.pager );

// Used by core appendCache; !undefined is always true
p.removeRows = wo.pager_removeRows;

// pager initializes multiple times before table has completed initialization
if ( p.isInitializing ) { return; }

Expand Down

0 comments on commit 17a8b2d

Please sign in to comment.