mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Fix search being canceled when filters emptied
Only reset the lastSearch and lastCombinedFilter variables if the filters were equal before. We don't need to "force filter refresh" if the filters were not equal anyways.
This commit is contained in:
parent
c2532c69a9
commit
20d87d933e
@ -1363,13 +1363,15 @@
|
||||
}
|
||||
// return if the last search is the same; but filter === false when updating the search
|
||||
// see example-widget-filter.html filter toggle buttons
|
||||
if ( tsf.equalFilters(c, c.lastSearch, currentFilters) && filter !== false ) {
|
||||
if ( tsf.equalFilters(c, c.lastSearch, currentFilters) ) {
|
||||
if ( filter !== false ) {
|
||||
return;
|
||||
} else if ( filter === false ) {
|
||||
} else {
|
||||
// force filter refresh
|
||||
c.lastCombinedFilter = '';
|
||||
c.lastSearch = [];
|
||||
}
|
||||
}
|
||||
// define filter inside it is false
|
||||
filters = filters || [];
|
||||
// convert filters to strings - see #1070
|
||||
|
Loading…
Reference in New Issue
Block a user