Skip to content

Commit

Permalink
fix(core): correct filter detection in autoAdjustHeight
Browse files Browse the repository at this point in the history
  • Loading branch information
nickescallon committed Nov 30, 2015
1 parent f715767 commit 31c8e9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/js/core/directives/ui-grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,13 +312,13 @@ function uiGridDirective($compile, $templateCache, $timeout, $window, gridUtil,
}
});

if (grid.options.enableFiltering) {
var allColumnsHaveFilteringTurnedOff = grid.options.columnDefs.every(function(col) {
if (grid.options.enableFiltering && !maxNumberOfFilters) {
var allColumnsHaveFilteringTurnedOff = grid.options.columnDefs.length && grid.options.columnDefs.every(function(col) {
return col.enableFiltering === false;
});

if (!allColumnsHaveFilteringTurnedOff) {
maxNumberOfFilters++;
maxNumberOfFilters = 1;
}
}

Expand Down

0 comments on commit 31c8e9e

Please sign in to comment.