Skip to content

Commit fb738e4

Browse files
MKirovaMKirova
authored andcommitted
chore(*): Fix size calc when height is set to null.
1 parent 97ee636 commit fb738e4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4102,9 +4102,8 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
41024102
}
41034103

41044104
get pinnedRowHeight() {
4105-
const containerHeight = this.pinContainer ? this.pinContainer.nativeElement.clientHeight : 0;
4106-
// 2px border
4107-
return this.pinnedRecords.length > 0 ? containerHeight + 2 : 0;
4105+
const containerHeight = this.pinContainer ? this.pinContainer.nativeElement.offsetHeight : 0;
4106+
return this.pinnedRecords.length > 0 ? containerHeight : 0;
41084107
}
41094108

41104109
get totalHeight() {
@@ -4423,7 +4422,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
44234422
}
44244423

44254424
this.calcHeight = this._calculateGridBodyHeight();
4426-
if (this.pinnedRowHeight) {
4425+
if (this.pinnedRowHeight && this.calcHeight) {
44274426
this.calcHeight -= this.pinnedRowHeight;
44284427
}
44294428
}

0 commit comments

Comments
 (0)