diff --git a/src/js/core/directives/ui-grid-native-scrollbar.js b/src/js/core/directives/ui-grid-native-scrollbar.js index 74b74adabf..2d39674a8b 100644 --- a/src/js/core/directives/ui-grid-native-scrollbar.js +++ b/src/js/core/directives/ui-grid-native-scrollbar.js @@ -80,8 +80,7 @@ // Update the vertical scrollbar's content height so it's the same as the canvas var contentHeight = rowContainer.getCanvasHeight(); - // TODO(c0bra): set scrollbar `top` by height of header row - // var headerHeight = gridUtil.outerElementHeight(containerCtrl.header); + //var headerHeight = gridUtil.outerElementHeight(containerCtrl.header); var headerHeight = colContainer.headerHeight ? colContainer.headerHeight : grid.headerHeight; // gridUtil.logDebug('headerHeight in scrollbar', headerHeight); diff --git a/src/js/core/factories/GridOptions.js b/src/js/core/factories/GridOptions.js index d5395be068..e6aeb6935b 100644 --- a/src/js/core/factories/GridOptions.js +++ b/src/js/core/factories/GridOptions.js @@ -138,6 +138,13 @@ angular.module('ui.grid') */ baseOptions.headerRowHeight = typeof(baseOptions.headerRowHeight) !== "undefined" ? baseOptions.headerRowHeight : 30; + if (baseOptions.hideHeader){ + baseOptions.headerRowHeight = 0; + } + else { + baseOptions.headerRowHeight = typeof(baseOptions.headerRowHeight) !== "undefined" ? baseOptions.headerRowHeight : 30; + } + /** * @ngdoc property * @name rowHeight