mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Pager: stop using combined filter values. See #1363
This commit is contained in:
parent
ea73eddab8
commit
829e5a62b5
@ -967,7 +967,10 @@
|
||||
.bind('filterInit filterStart '.split(' ').join(namespace + ' '), 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('')) {
|
||||
if (
|
||||
e.type === 'filterStart' &&
|
||||
p.pageReset !== false &&
|
||||
(c.lastSearch || []).join(',') !== (p.currentFilters || []).join(',')) {
|
||||
p.page = p.pageReset; // fixes #456 & #565
|
||||
}
|
||||
})
|
||||
|
@ -252,7 +252,8 @@
|
||||
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( '' ) ) {
|
||||
( c.lastSearch || [] ).join( ',' ) !== ( p.currentFilters || [] ).join( ',' )
|
||||
) {
|
||||
p.page = wo.pager_pageReset; // fixes #456 & #565
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user