mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Filter: hide filter row using the "filtered" class name
needed for the scroller widget, or the filter row becomes visible:hidden on filterEnd and adds a butt-load of padding to the top of the scroll window
This commit is contained in:
parent
6cd67973cc
commit
11ff8c4ab1
@ -620,8 +620,11 @@ ts.filter = {
|
||||
ts.filter.buildRow(table, c, wo);
|
||||
}
|
||||
|
||||
c.$table.bind('addRows updateCell update updateRows updateComplete appendCache filterReset filterEnd search '.split(' ').join(c.namespace + 'filter '), function(event, filter) {
|
||||
c.$table.find('.' + ts.css.filterRow).toggle( !(wo.filter_hideEmpty && $.isEmptyObject(c.cache) && !(c.delayInit && event.type === 'appendCache')) ); // fixes #450
|
||||
txt = 'addRows updateCell update updateRows updateComplete appendCache filterReset filterEnd search '.split(' ').join(c.namespace + 'filter ');
|
||||
c.$table.bind(txt, function(event, filter) {
|
||||
val = !(wo.filter_hideEmpty && $.isEmptyObject(c.cache) && !(c.delayInit && event.type === 'appendCache'));
|
||||
// hide filter row using the "filtered" class name
|
||||
c.$table.find('.' + ts.css.filterRow).toggleClass(wo.filter_filteredRow, val ); // fixes #450
|
||||
if ( !/(search|filter)/.test(event.type) ) {
|
||||
event.stopPropagation();
|
||||
ts.filter.buildDefault(table, true);
|
||||
|
Loading…
Reference in New Issue
Block a user