Skip to content

Commit aa86b81

Browse files
MKirovaMKirova
authored andcommitted
chore(*): Remove renderedActualRowHeight, since we now measure whole row.
1 parent 8a5f266 commit aa86b81

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

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

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3363,7 +3363,7 @@ export abstract class IgxGridBaseDirective implements GridType,
33633363
private _sortAscendingHeaderIconTemplate: TemplateRef<IgxGridHeaderTemplateContext> = null;
33643364
private _sortDescendingHeaderIconTemplate: TemplateRef<IgxGridHeaderTemplateContext> = null;
33653365
private _gridSize: Size = Size.Large;
3366-
private _defaultRowHeight = 50;
3366+
private _defaultRowHeight = 51;
33673367
private _rowCount: number;
33683368
private _cellMergeMode: GridCellMergeMode = GridCellMergeMode.onSort;
33693369
private _columnsToMerge: IgxColumnComponent[] = [];
@@ -5620,7 +5620,7 @@ export abstract class IgxGridBaseDirective implements GridType,
56205620
*/
56215621
protected get defaultTargetBodyHeight(): number {
56225622
const allItems = this.dataLength;
5623-
return this.renderedActualRowHeight * Math.min(this._defaultTargetRecordNumber,
5623+
return this.renderedRowHeight * Math.min(this._defaultTargetRecordNumber,
56245624
this.paginator ? Math.min(allItems, this.paginator.perPage) : allItems);
56255625
}
56265626

@@ -5629,9 +5629,6 @@ export abstract class IgxGridBaseDirective implements GridType,
56295629
* The rowHeight input is bound to min-height css prop of rows that adds a 1px border in all cases
56305630
*/
56315631
public get renderedRowHeight(): number {
5632-
if (this.hasCellsToMerge) {
5633-
return this.rowHeight;
5634-
}
56355632
return this.rowHeight;
56365633
}
56375634

@@ -7870,15 +7867,6 @@ export abstract class IgxGridBaseDirective implements GridType,
78707867
this.gridScroll.emit(args);
78717868
}
78727869

7873-
protected get renderedActualRowHeight() {
7874-
let border = 1;
7875-
if (this.rowList.toArray().length > 0) {
7876-
const rowStyles = this.document.defaultView.getComputedStyle(this.rowList.first.nativeElement);
7877-
border = rowStyles.borderBottomWidth ? Math.ceil(parseFloat(rowStyles.borderBottomWidth)) : border;
7878-
}
7879-
return this.rowHeight + border;
7880-
}
7881-
78827870
private executeCallback(rowIndex, visibleColIndex = -1, cb: (args: any) => void = null) {
78837871
if (!cb) {
78847872
return;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1281,7 +1281,7 @@ export class IgxGridComponent extends IgxGridBaseDirective implements GridType,
12811281
*/
12821282
protected override get defaultTargetBodyHeight(): number {
12831283
const allItems = this.totalItemCount || this.dataLength;
1284-
return this.renderedActualRowHeight * Math.min(this._defaultTargetRecordNumber,
1284+
return this.renderedRowHeight * Math.min(this._defaultTargetRecordNumber,
12851285
this.paginator ? Math.min(allItems, this.perPage) : allItems);
12861286
}
12871287

0 commit comments

Comments
 (0)