mirror of
https://github.com/Mottie/tablesorter.git
synced 2025-01-12 15:24:21 +00:00
Pager: correcting page calculation. Fixes #468
This commit is contained in:
parent
6d379a78b4
commit
e3a4f374af
@ -562,7 +562,7 @@
|
||||
p.page = $.data(table, 'pagerLastPage') || p.page || 0;
|
||||
p.size = $.data(table, 'pagerLastSize') || parseInt(pg.find('option[selected]').val(), 10) || p.size || 10;
|
||||
pg.val(p.size); // set page size
|
||||
p.totalPages = Math.ceil( Math.min( p.totalPages, p.filteredPages ) / p.size );
|
||||
p.totalPages = Math.ceil( Math.min( p.totalRows, p.filteredRows ) / p.size );
|
||||
if ( triggered ) {
|
||||
$(table).trigger('updateRow');
|
||||
setPageSize(table, p.size, p);
|
||||
|
@ -759,7 +759,7 @@ tsp = ts.pager = {
|
||||
p.page = $.data(table, 'pagerLastPage') || p.page || 0;
|
||||
p.size = $.data(table, 'pagerLastSize') || parseInt(p.$size.find('option[selected]').val(), 10) || p.size || 10;
|
||||
p.$size.val(p.size); // set page size
|
||||
p.totalPages = Math.ceil( Math.min( p.totalPages, p.filteredPages ) / p.size );
|
||||
p.totalPages = Math.ceil( Math.min( p.totalRows, p.filteredRows ) / p.size );
|
||||
c.$table.removeClass('pagerDisabled');
|
||||
if ( triggered ) {
|
||||
c.$table.trigger('updateRow');
|
||||
|
Loading…
Reference in New Issue
Block a user