Skip to content

Commit

Permalink
fix(ui-grid.js): Ignore scrollbar height prior to checking if autoAdj…
Browse files Browse the repository at this point in the history
…ustHeight 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
  • Loading branch information
Portugal, Marcelo authored and mportuga committed Mar 24, 2018
1 parent dbe3ecd commit f9971a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/core/directives/ui-grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ function uiGridDirective($window, gridUtil, uiGridConstants) {
grid.gridHeight = $scope.gridHeight = gridUtil.elementHeight($elm);

// 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
if (grid.gridHeight <= grid.options.rowHeight && grid.options.enableMinHeightCheck) {
if (grid.gridHeight - grid.scrollbarHeight <= grid.options.rowHeight && grid.options.enableMinHeightCheck) {
autoAdjustHeight();
}

Expand Down

0 comments on commit f9971a5

Please sign in to comment.