mirror of
https://github.com/Mottie/tablesorter.git
synced 2025-01-12 15:24:21 +00:00
Pager: Get most up to date filter before setting pageReset. Fixes #783
This commit is contained in:
parent
4c06e417d3
commit
1d3a2c21a4
@ -831,8 +831,8 @@
|
||||
|
||||
$t
|
||||
.unbind('filterInit filterStart filterEnd sortEnd disable enable destroy updateComplete pageSize pageSet '.split(' ').join('.pager '))
|
||||
.bind('filterInit.pager filterStart.pager', function(e) {
|
||||
p.currentFilters = c.$table.data('lastSearch');
|
||||
.bind('filterInit.pager filterStart.pager', function(e, filters) {
|
||||
p.currentFilters = $.isArray(filters) ? filters : c.$table.data('lastSearch');
|
||||
// don't change page if filters are the same (pager updating, etc)
|
||||
if (e.type === 'filterStart' && p.pageReset !== false && (c.lastCombinedFilter || '') !== (p.currentFilters || []).join('')) {
|
||||
p.page = p.pageReset; // fixes #456 & #565
|
||||
|
@ -225,8 +225,8 @@ tsp = ts.pager = {
|
||||
|
||||
c.$table
|
||||
.off('filterInit filterStart filterEnd sortEnd disable enable destroy updateComplete pageSize pageSet '.split(' ').join('.pager '))
|
||||
.on('filterInit.pager filterStart.pager', function(e) {
|
||||
p.currentFilters = c.$table.data('lastSearch');
|
||||
.on('filterInit.pager filterStart.pager', function(e, filters) {
|
||||
p.currentFilters = $.isArray(filters) ? filters : c.$table.data('lastSearch');
|
||||
// don't change page if filters are the same (pager updating, etc)
|
||||
if (e.type === 'filterStart' && wo.pager_pageReset !== false && (c.lastCombinedFilter || '') !== (p.currentFilters || []).join('')) {
|
||||
p.page = wo.pager_pageReset; // fixes #456 & #565
|
||||
|
Loading…
Reference in New Issue
Block a user