Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -7259,20 +7259,24 @@ export abstract class IgxGridBaseDirective implements GridType,
if (!this._height) {
return null;
}
const styles = this.document.defaultView.getComputedStyle(this.nativeElement);
const actualTheadRow = this.getTheadRowHeight();
const footerHeight = this.getFooterHeight();
const toolbarHeight = this.getToolbarHeight();
const pagingHeight = this.getPagingFooterHeight();
const groupAreaHeight = this.getGroupAreaHeight();
const scrHeight = this.getComputedHeight(this.scr.nativeElement);
const borderTop = parseFloat(styles.getPropertyValue('border-top')) || 0;
const borderBottom = parseFloat(styles.getPropertyValue('border-bottom')) || 0;

const renderedHeight = toolbarHeight + actualTheadRow +
footerHeight + pagingHeight + groupAreaHeight +
scrHeight;
scrHeight + borderTop + borderBottom;

let gridHeight = 0;

if (this.isPercentHeight) {
const computed = this.document.defaultView.getComputedStyle(this.nativeElement).getPropertyValue('height');
const computed = styles.getPropertyValue('height');
const autoSize = this._shouldAutoSize(renderedHeight);
if (autoSize || computed.indexOf('%') !== -1) {
const bodyHeight = this.getDataBasedBodyHeight();
Expand Down
5 changes: 5 additions & 0 deletions src/app/grid-auto-size/grid-auto-size.sample.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@
margin-bottom: 16px;
max-width: 900px;
}


igx-grid {
border: 1px solid lightgray;
}
Loading