mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Fixed an issue that occurred if you had an option in the pager dropdown with the same value as the total amount of table rows. When you selected such an option, the option with the value "all" was selected. (#1364)
This commit is contained in:
parent
51ee4d4507
commit
82889c6a92
@ -820,7 +820,9 @@
|
||||
|
||||
setPageSize = function(table, size, p) {
|
||||
p.size = parsePageSize( p, size, 'get' );
|
||||
p.$container.find(p.cssPageSize).val( parsePageSize( p, p.size, 'set' ) );
|
||||
var updatedPageSize = parsePageSize( p, p.size, 'set' );
|
||||
p.$container.find(p.cssPageSize).val( updatedPageSize !== 'all' ? updatedPageSize :
|
||||
(p.$container.find(p.cssPageSize.concat(' option[value="').concat(size).concat('"]')).length !== 0 ? size : updatedPageSize) );
|
||||
$.data(table, 'pagerLastPage', parsePageNumber( table, p ) );
|
||||
$.data(table, 'pagerLastSize', p.size);
|
||||
p.totalPages = p.size === 'all' ? 1 : Math.ceil( p.totalRows / p.size );
|
||||
|
Loading…
Reference in New Issue
Block a user