Skip to content

Commit

Permalink
Merge branch 'hideHeaderBug' of https://github.com/mathiasdose/ng-grid
Browse files Browse the repository at this point in the history
…into mathiasdose-hideHeaderBug

Conflicts:
	src/js/core/factories/GridOptions.js
  • Loading branch information
freein authored and c0bra committed Dec 2, 2014
2 parents 9bfa6e3 + c556faf commit 0991d20
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/js/core/directives/ui-grid-native-scrollbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
7 changes: 7 additions & 0 deletions src/js/core/factories/GridOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0991d20

Please sign in to comment.