Skip to content

hideHeader misplacement bug fixed #1996

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 2, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: 5 additions & 2 deletions src/js/core/factories/GridOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,11 @@ angular.module('ui.grid')
baseOptions.getRowIdentity = baseOptions.getRowIdentity || function getRowIdentity(row) {
return row.$$hashKey;
};

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;
}
baseOptions.rowHeight = baseOptions.rowHeight || 30;
baseOptions.maxVisibleRowCount = baseOptions.maxVisibleRowCount || 200;

Expand Down