Skip to content

Commit fb2450f

Browse files
author
Konstantin Dinev
authored
Merge pull request #5450 from IgniteUI/mkirova/fix-4468-master
fix(igxGrid): Fixing sizing when summaries are enabled. SummariesHeig…
2 parents 1908962 + f006185 commit fb2450f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

projects/igniteui-angular/src/lib/grids/grid-base.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4110,15 +4110,15 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
41104110
if (!this._height) {
41114111
return null;
41124112
}
4113-
const footerBordersAndScrollbars = this.tfoot.nativeElement.offsetHeight -
4114-
this.tfoot.nativeElement.clientHeight;
4113+
const footerHeight = this.summariesHeight || this.tfoot.nativeElement.offsetHeight -
4114+
this.tfoot.nativeElement.clientHeight;
41154115
let gridHeight;
41164116
const computed = this.document.defaultView.getComputedStyle(this.nativeElement);
41174117
const toolbarHeight = this.getToolbarHeight();
41184118
const pagingHeight = this.getPagingHeight();
41194119
const groupAreaHeight = this.getGroupAreaHeight();
41204120
const renderedHeight = toolbarHeight + this.theadRow.nativeElement.offsetHeight +
4121-
this.summariesHeight + pagingHeight + groupAreaHeight + footerBordersAndScrollbars +
4121+
footerHeight + pagingHeight + groupAreaHeight +
41224122
this.scr.nativeElement.clientHeight;
41234123

41244124
if (this.isPercentHeight) {

projects/igniteui-angular/src/lib/grids/grid/grid.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4309,7 +4309,7 @@ describe('IgxGrid Component Tests', () => {
43094309
const summaries = fix.debugElement.queryAll(By.css('igx-grid-summary-cell'));
43104310
expect(headers.length).toBe(4);
43114311
expect(summaries.length).toBe(4);
4312-
expect(parseInt(window.getComputedStyle(gridBody.nativeElement).height, 10)).toBe(138);
4312+
expect(parseInt(window.getComputedStyle(gridBody.nativeElement).height, 10)).toBe(139);
43134313
expect(parseInt(window.getComputedStyle(paging.nativeElement).height, 10)).toBe(36);
43144314
});
43154315

0 commit comments

Comments
 (0)