Skip to content

Commit 43974c4

Browse files
committed
fix(core): consider enableFiltering in autoAdjustHeight
1 parent 36f386f commit 43974c4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/js/core/directives/ui-grid.js

+11
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,17 @@ function uiGridDirective($compile, $templateCache, $timeout, $window, gridUtil,
308308
}
309309
}
310310
});
311+
312+
if (grid.options.enableFiltering) {
313+
var allColumnsHaveFilteringTurnedOff = grid.options.columnDefs.every(function(col) {
314+
return col.enableFiltering === false;
315+
});
316+
317+
if (!allColumnsHaveFilteringTurnedOff) {
318+
maxNumberOfFilters++;
319+
}
320+
}
321+
311322
var filterHeight = maxNumberOfFilters * headerHeight;
312323

313324
var newHeight = headerHeight + contentHeight + footerHeight + scrollbarHeight + filterHeight;

0 commit comments

Comments
 (0)