Skip to content

Commit

Permalink
Fix: When removing rows with server-side processing and paging enable…
Browse files Browse the repository at this point in the history
…d, the client-side could request a page that no longer exists.

- Thread 44354
  • Loading branch information
Allan Jardine committed Aug 28, 2017
1 parent c42883f commit 20253b6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions js/api/api.rows.js
Expand Up @@ -206,6 +206,11 @@ _api_registerPlural( 'rows().remove()', 'row().remove()', function () {
_fnDeleteIndex( settings.aiDisplay, row );
_fnDeleteIndex( that[ thatIdx ], row, false ); // maintain local indexes

// For server-side processing tables - subtract the deleted row from the count
if ( settings._iRecordsDisplay > 0 ) {
settings._iRecordsDisplay--;
}

// Check for an 'overflow' they case for displaying the table
_fnLengthOverflow( settings );

Expand Down

0 comments on commit 20253b6

Please sign in to comment.