Skip to content

Commit

Permalink
Merge pull request #11243 from IgniteUI/mkirova/pivot-minor-perf-impr
Browse files Browse the repository at this point in the history
PivotGrid Minor performance improvements
  • Loading branch information
dkamburov authored Mar 21, 2022
2 parents 4c767d6 + c13bc3d commit 31b8421
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1464,6 +1464,9 @@ export class IgxGridForOfDirective<T> extends IgxForOfDirective<T> implements On
@Input()
public igxGridForOfUniqueSizeCache = false;

@Input()
public igxGridForOfVariableSizes = true;

public get igxGridForOf() {
return this.igxForOf;
}
Expand Down Expand Up @@ -1494,6 +1497,12 @@ export class IgxGridForOfDirective<T> extends IgxForOfDirective<T> implements On
return this.igxForSizePropName || 'height';
}

public recalcUpdateSizes() {
if (this.igxGridForOfVariableSizes) {
super.recalcUpdateSizes();
}
}

/**
* @hidden @internal
* An event that is emitted after data has been changed but before the view is refreshed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
let-rowIndex="index" [igxForScrollOrientation]="'vertical'" [igxForScrollContainer]='verticalScroll'
[igxForContainerSize]='calcHeight'
[igxForItemSize]="hasColumnLayouts ? rowHeight * multiRowLayoutRowSize + 1 : renderedRowHeight"
[igxGridForOfVariableSizes]='false'
#verticalScrollContainer>
<ng-template
[igxTemplateOutlet]='recordTemplate'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ export class IgxPivotHeaderRowComponent extends IgxGridHeaderRowComponent implem
*/
public getAreaHeight(area: IgxChipsAreaComponent) {
const chips = area.chipsList;
return chips && chips.length > 0 ? chips.first.nativeElement.clientHeight : 0;
return chips && chips.length > 0 ? chips.first.nativeElement.offsetHeight : 0;
}

/**
Expand Down

0 comments on commit 31b8421

Please sign in to comment.