Skip to content

Commit 6be2847

Browse files
MKirovaMKirova
authored andcommitted
chore(*): Additional fix for initially hidden grid with remote data.
1 parent e26600e commit 6be2847

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3787,8 +3787,8 @@ export abstract class IgxGridBaseDirective implements GridType,
37873787
public dataRebound(event) {
37883788
this.selectionService.clearHeaderCBState();
37893789
if (this._shouldRecalcRowHeight) {
3790-
this.updateDefaultRowHeight();
37913790
this._shouldRecalcRowHeight = false;
3791+
this.updateDefaultRowHeight();
37923792
}
37933793
this.dataChanged.emit(event);
37943794
}
@@ -7643,7 +7643,12 @@ export abstract class IgxGridBaseDirective implements GridType,
76437643

76447644
private updateDefaultRowHeight() {
76457645
if (this.dataRowList.length > 0 && this.dataRowList.first.cells && this.dataRowList.first.cells.length > 0) {
7646-
this._defaultRowHeight = parseFloat(this.document.defaultView.getComputedStyle(this.dataRowList.first.cells.first.nativeElement)?.getPropertyValue('height')) || this.defaultRowHeight;
7646+
const height = parseFloat(this.document.defaultView.getComputedStyle(this.dataRowList.first.cells.first.nativeElement)?.getPropertyValue('height'));
7647+
if (height) {
7648+
this._defaultRowHeight = height;
7649+
} else {
7650+
this._shouldRecalcRowHeight = true;
7651+
}
76477652
}
76487653
}
76497654

0 commit comments

Comments
 (0)