Skip to content

Commit c17019f

Browse files
MKirovaMKirova
MKirova
authored and
MKirova
committed
chore(*): Prevent unneccesary recalc in case there is no pinned records.
1 parent 672b278 commit c17019f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

+5-3
Original file line numberDiff line numberDiff line change
@@ -2970,9 +2970,11 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
29702970
vertScrDC.addEventListener('scroll', this.scrollHandler);
29712971
vertScrDC.addEventListener('wheel', () => this.wheelHandler());
29722972

2973-
this.pinContainers.changes.subscribe(() => {
2974-
// on row pin containers change grid sizes should be recalculated.
2975-
this.calculateGridSizes();
2973+
this.pinContainers.changes.subscribe((c) => {
2974+
if (this.hasPinnedRecords) {
2975+
// on row pin containers change grid sizes should be recalculated.
2976+
this.calculateGridSizes();
2977+
}
29762978
});
29772979
}
29782980

0 commit comments

Comments
 (0)