Skip to content

Commit f9971a5

Browse files
Portugal, Marcelomportuga
Portugal, Marcelo
authored andcommitted
fix(ui-grid.js): Ignore scrollbar height prior to checking if autoAdjustHeight is needed.
Subtract scrollbar height from grid height during the check for whether or not the grid is tall enough to fit a single row. fix #5231
1 parent dbe3ecd commit f9971a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ function uiGridDirective($window, gridUtil, uiGridConstants) {
280280
grid.gridHeight = $scope.gridHeight = gridUtil.elementHeight($elm);
281281

282282
// If the grid isn't tall enough to fit a single row, it's kind of useless. Resize it to fit a minimum number of rows
283-
if (grid.gridHeight <= grid.options.rowHeight && grid.options.enableMinHeightCheck) {
283+
if (grid.gridHeight - grid.scrollbarHeight <= grid.options.rowHeight && grid.options.enableMinHeightCheck) {
284284
autoAdjustHeight();
285285
}
286286

0 commit comments

Comments
 (0)