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:
Mottie 2015-01-14 00:15:57 -06:00
parent 6cd67973cc
commit 11ff8c4ab1

View File

@ -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);