Skip to content

Commit

Permalink
Pager: restore first row in cacheIndex. Fixes #1714
Browse files Browse the repository at this point in the history
  • Loading branch information
Mottie committed Mar 3, 2020
1 parent 6a32e5a commit 3a7611c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions addons/pager/jquery.tablesorter.pager.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* tablesorter (FORK) pager plugin
* updated 2018-08-27 (v2.31.0)
* updated 2020-03-03 (v2.31.3)
*/
/*jshint browser:true, jquery:true, unused:false */
;(function($) {
Expand Down Expand Up @@ -367,7 +367,7 @@
sz = p.size === 'all' ? p.totalRows : p.size,
s = ( p.page * sz ),
e = s + sz,
last = 0, // for cache indexing
last = -1, // for cache indexing
j = 0; // size counter
p.cacheIndex = [];
for ( i = 0; i < l; i++ ) {
Expand Down
6 changes: 3 additions & 3 deletions js/widgets/widget-pager.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Widget: Pager - updated 2018-08-27 (v2.31.0) */
/*! Widget: Pager - updated 2020-03-03 (v2.31.3) */
/* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
Expand Down Expand Up @@ -665,14 +665,14 @@
sz = p.size === 'all' ? p.totalRows : p.size,
start = ( p.page * sz ),
end = start + sz,
last = 0, // for cache indexing
last = -1, // for cache indexing
size = 0; // size counter
p.cacheIndex = [];
for ( tbodyIndex = 0; tbodyIndex < tbodyLen; tbodyIndex++ ) {
$rows = c.$tbodies.eq( tbodyIndex ).children( 'tr' );
len = $rows.length;
lastIndex = 0;
last = 0; // for cache indexing
last = -1; // for cache indexing
size = 0; // size counter
for ( rowIndex = 0; rowIndex < len; rowIndex++ ) {
if ( !p.regexFiltered.test( $rows[ rowIndex ].className ) ) {
Expand Down

0 comments on commit 3a7611c

Please sign in to comment.