Core & pager: Change pager removeRows check. Closes #1525 & #1466

This commit is contained in:
Rob Garrison 2018-03-18 08:16:57 -05:00
parent 7b15ec99c5
commit 17a8b2dd63
2 changed files with 4 additions and 2 deletions

View File

@ -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;
@ -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 );
}
}

View File

@ -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; }