From 66afb8a18276651a6c9533552aa1be7af81e2b1e Mon Sep 17 00:00:00 2001 From: MKirova Date: Thu, 8 Jan 2026 16:55:42 +0200 Subject: [PATCH 01/32] fix(perf): Apply some performance optimizations. --- .../src/app/grid/grid.component.html | 1 + .../src/styles.scss | 2 +- .../for-of/base.helper.component.ts | 5 --- .../src/directives/for-of/for_of.directive.ts | 33 ++++++++++------- .../grids/grid/src/grid-base.directive.ts | 36 +++++++++++++------ 5 files changed, 49 insertions(+), 28 deletions(-) diff --git a/projects/igniteui-angular-performance/src/app/grid/grid.component.html b/projects/igniteui-angular-performance/src/app/grid/grid.component.html index 9cad429ffa8..309d817ea83 100644 --- a/projects/igniteui-angular-performance/src/app/grid/grid.component.html +++ b/projects/igniteui-angular-performance/src/app/grid/grid.component.html @@ -1,5 +1,6 @@
{ ], standalone: true }) -export class IgxForOfDirective extends IgxForOfToken implements OnInit, OnChanges, DoCheck, OnDestroy, AfterViewInit { +export class IgxForOfDirective extends IgxForOfToken implements OnInit, OnChanges, OnDestroy, AfterViewInit { private _viewContainer = inject(ViewContainerRef); protected _template = inject>>(TemplateRef); protected _differs = inject(IterableDiffers); @@ -93,7 +93,7 @@ export class IgxForOfDirective extends IgxForOfToken extends IgxForOfToken extends IgxForOfToken extends IgxForOfToken extends IgxForOfToken extends IgxForOfContext selector: '[igxGridFor][igxGridForOf]', standalone: true }) -export class IgxGridForOfDirective extends IgxForOfDirective implements OnInit, OnChanges, DoCheck { +export class IgxGridForOfDirective extends IgxForOfDirective implements OnInit, OnChanges { protected syncService = inject(IgxForOfSyncService); @Input() @@ -1626,7 +1633,7 @@ export class IgxGridForOfDirective extends IgxForOfDirec this.syncService.setMaster(this, true); } - public override ngDoCheck() { + public override resolveDataDiff() { if (this._differ) { const changes = this._differ.diff(this.igxForOf); if (changes) { @@ -1660,19 +1667,21 @@ export class IgxGridForOfDirective extends IgxForOfDirec } public override onScroll(event) { + this.scrollComponent.scrollAmount = event.target.scrollTop; if (!parseInt(this.scrollComponent.nativeElement.style.height, 10)) { return; } if (!this._bScrollInternal) { - this._calcVirtualScrollPosition(event.target.scrollTop); + this._calcVirtualScrollPosition(this.scrollComponent.scrollAmount); } else { this._bScrollInternal = false; } const scrollOffset = this.fixedUpdateAllElements(this._virtScrollPosition); - this.dc.instance._viewContainer.element.nativeElement.style.top = -(scrollOffset) + 'px'; + requestAnimationFrame(() => { + this.dc.instance._viewContainer.element.nativeElement.style.transform = `translateY(${-scrollOffset}px)`; + }); - this._zone.onStable.pipe(first()).subscribe(this.recalcUpdateSizes.bind(this)); this.cdr.markForCheck(); } diff --git a/projects/igniteui-angular/grids/grid/src/grid-base.directive.ts b/projects/igniteui-angular/grids/grid/src/grid-base.directive.ts index cb01b0beff7..feaf3c1cc89 100644 --- a/projects/igniteui-angular/grids/grid/src/grid-base.directive.ts +++ b/projects/igniteui-angular/grids/grid/src/grid-base.directive.ts @@ -90,7 +90,8 @@ import { IGridResourceStrings, IgxOverlayOutletDirective, DEFAULT_LOCALE, - onResourceChangeHandle + onResourceChangeHandle, + PerformanceService } from 'igniteui-angular/core'; import { IgcTrialWatermark } from 'igniteui-trial-watermark'; import { Subject, pipe, fromEvent, animationFrameScheduler, merge } from 'rxjs'; @@ -134,6 +135,7 @@ const MIN_ROW_EDITING_COUNT_THRESHOLD = 2; @Directive() export abstract class IgxGridBaseDirective implements GridType, OnInit, DoCheck, OnDestroy, AfterContentInit, AfterViewInit { + private performance = inject(PerformanceService); public readonly validation = inject(IgxGridValidationService); /** @hidden @internal */ @@ -2998,6 +3000,9 @@ export abstract class IgxGridBaseDirective implements GridType, /** @hidden @internal */ public resizeNotify = new Subject(); + /** @hidden @internal */ + public scrollNotify = new Subject(); + /** @hidden @internal */ public rowAddedNotifier = new Subject(); @@ -3709,6 +3714,15 @@ export abstract class IgxGridBaseDirective implements GridType, this.subscribeToTransactions(); + this.scrollNotify.pipe( + filter(() => !this._init), + throttleTime(40, animationFrameScheduler, { leading: false, trailing: true }), + destructor + ) + .subscribe((event) => { + this.verticalScrollHandler(event); + }); + this.resizeNotify.pipe( filter(() => !this._init), throttleTime(40, animationFrameScheduler, { leading: true, trailing: true }), @@ -3852,6 +3866,8 @@ export abstract class IgxGridBaseDirective implements GridType, public ngOnInit() { this._setupServices(); this._setupListeners(); + this.performance.setLogEnabled(true); + this.performance.attachObserver(); this.rowListDiffer = this.differs.find([]).create(null); // compare based on field, not on object ref. this.columnListDiffer = this.differs.find([]).create((_index, col: ColumnType) => col.field); @@ -4153,7 +4169,7 @@ export abstract class IgxGridBaseDirective implements GridType, this.zone.runOutsideAngular(() => { this.verticalScrollHandler = this.verticalScrollHandler.bind(this); this.horizontalScrollHandler = this.horizontalScrollHandler.bind(this); - this.verticalScrollContainer.getScroll().addEventListener('scroll', this.verticalScrollHandler); + this.verticalScrollContainer.getScroll().addEventListener('scroll', (event) => this.scrollNotify.next(event)); this.headerContainer?.getScroll().addEventListener('scroll', this.horizontalScrollHandler); if (this.hasColumnsToAutosize) { this.headerContainer?.dataChanged.pipe(takeUntil(this.destroy$)).subscribe(() => { @@ -7721,14 +7737,14 @@ export abstract class IgxGridBaseDirective implements GridType, this.verticalScrollContainer.onScroll(event); this.disableTransitions = true; - this.zone.run(() => { - this.zone.onStable.pipe(first()).subscribe(() => { - this.verticalScrollContainer.chunkLoad.emit(this.verticalScrollContainer.state); - if (this.rowEditable) { - this.changeRowEditingOverlayStateOnScroll(this.crudService.rowInEditMode); - } - }); - }); + // this.zone.run(() => { + // this.zone.onStable.pipe(first()).subscribe(() => { + // this.verticalScrollContainer.chunkLoad.emit(this.verticalScrollContainer.state); + // if (this.rowEditable) { + // this.changeRowEditingOverlayStateOnScroll(this.crudService.rowInEditMode); + // } + // }); + // }); this.disableTransitions = false; this.hideOverlays(); From 3272733157b040ec823ca96660f29a32a3b17459 Mon Sep 17 00:00:00 2001 From: MKirova Date: Fri, 9 Jan 2026 16:31:14 +0200 Subject: [PATCH 02/32] chore(*): MInor tweaks to scroll handler. --- .../directives/src/directives/for-of/for_of.directive.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts b/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts index c8355a5a833..ba8f578f258 100644 --- a/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts +++ b/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts @@ -1668,7 +1668,7 @@ export class IgxGridForOfDirective extends IgxForOfDirec public override onScroll(event) { this.scrollComponent.scrollAmount = event.target.scrollTop; - if (!parseInt(this.scrollComponent.nativeElement.style.height, 10)) { + if (!this.scrollComponent.size) { return; } if (!this._bScrollInternal) { @@ -1678,7 +1678,7 @@ export class IgxGridForOfDirective extends IgxForOfDirec } const scrollOffset = this.fixedUpdateAllElements(this._virtScrollPosition); - requestAnimationFrame(() => { + this._zone.onStable.pipe(first()).subscribe(() => { this.dc.instance._viewContainer.element.nativeElement.style.transform = `translateY(${-scrollOffset}px)`; }); From 62cd4e03d60e4dedf09c00b37ae5baa024ea3c0e Mon Sep 17 00:00:00 2001 From: MKirova Date: Fri, 9 Jan 2026 16:35:05 +0200 Subject: [PATCH 03/32] chore(*): Minor tweak for verticalScrollHandler. --- .../grids/grid/src/grid-base.directive.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/projects/igniteui-angular/grids/grid/src/grid-base.directive.ts b/projects/igniteui-angular/grids/grid/src/grid-base.directive.ts index feaf3c1cc89..7e592fa3fce 100644 --- a/projects/igniteui-angular/grids/grid/src/grid-base.directive.ts +++ b/projects/igniteui-angular/grids/grid/src/grid-base.directive.ts @@ -7737,14 +7737,12 @@ export abstract class IgxGridBaseDirective implements GridType, this.verticalScrollContainer.onScroll(event); this.disableTransitions = true; - // this.zone.run(() => { - // this.zone.onStable.pipe(first()).subscribe(() => { - // this.verticalScrollContainer.chunkLoad.emit(this.verticalScrollContainer.state); - // if (this.rowEditable) { - // this.changeRowEditingOverlayStateOnScroll(this.crudService.rowInEditMode); - // } - // }); - // }); + this.zone.onStable.pipe(first()).subscribe(() => { + this.verticalScrollContainer.chunkLoad.emit(this.verticalScrollContainer.state); + if (this.rowEditable) { + this.changeRowEditingOverlayStateOnScroll(this.crudService.rowInEditMode); + } + }); this.disableTransitions = false; this.hideOverlays(); From c4119a0b9ebbd56bc1f270929c1766bedf94a74f Mon Sep 17 00:00:00 2001 From: MKirova Date: Mon, 12 Jan 2026 13:57:01 +0200 Subject: [PATCH 04/32] chore(*): Add style writes in afterNextRender's write callback. --- .../src/app/grid/grid.component.html | 2 +- .../src/directives/for-of/for_of.directive.ts | 30 ++++++++++++++----- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/projects/igniteui-angular-performance/src/app/grid/grid.component.html b/projects/igniteui-angular-performance/src/app/grid/grid.component.html index 309d817ea83..377941618c5 100644 --- a/projects/igniteui-angular-performance/src/app/grid/grid.component.html +++ b/projects/igniteui-angular-performance/src/app/grid/grid.component.html @@ -3,7 +3,7 @@ style="--ig-size: var(--ig-size-small);" #grid [data]="data" - [allowFiltering]="true" + [allowFiltering]="false" [height]="'100%'" [width]="'100%'" > diff --git a/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts b/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts index ba8f578f258..77419755d3b 100644 --- a/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts +++ b/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts @@ -1,5 +1,5 @@ import { NgForOfContext } from '@angular/common'; -import { ChangeDetectorRef, ComponentRef, Directive, EmbeddedViewRef, EventEmitter, Input, IterableChanges, IterableDiffer, IterableDiffers, NgZone, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, TemplateRef, TrackByFunction, ViewContainerRef, AfterViewInit, booleanAttribute, DOCUMENT, inject } from '@angular/core'; +import { ChangeDetectorRef, ComponentRef, Directive, EmbeddedViewRef, EventEmitter, Input, IterableChanges, IterableDiffer, IterableDiffers, NgZone, OnChanges, OnDestroy, OnInit, Output, SimpleChanges, TemplateRef, TrackByFunction, ViewContainerRef, AfterViewInit, booleanAttribute, DOCUMENT, inject, afterNextRender, runInInjectionContext, EnvironmentInjector } from '@angular/core'; import { DisplayContainerComponent } from './display.container'; import { HVirtualHelperComponent } from './horizontal.virtual.helper.component'; @@ -88,6 +88,7 @@ export class IgxForOfDirective extends IgxForOfToken>>(TemplateRef); protected _differs = inject(IterableDiffers); + protected _injector = inject(EnvironmentInjector); public cdr = inject(ChangeDetectorRef); protected _zone = inject(NgZone); protected syncScrollService = inject(IgxForOfScrollSyncService); @@ -606,7 +607,13 @@ export class IgxForOfDirective extends IgxForOfToken { + afterNextRender({ + write: () => { + this.dc.instance._viewContainer.element.nativeElement.style.transform = `translateY(${-scrollOffset}px)`; + } + }); + }); } const maxRealScrollTop = this.scrollComponent.nativeElement.scrollHeight - containerSize; @@ -901,7 +908,13 @@ export class IgxForOfDirective extends IgxForOfToken { + afterNextRender({ + write: () => { + this.dc.instance._viewContainer.element.nativeElement.style.transform = `translateY(${-scrollOffset}px)`; + } + }); + }); this._zone.onStable.pipe(first()).subscribe(this.recalcUpdateSizes.bind(this)); @@ -1677,10 +1690,13 @@ export class IgxGridForOfDirective extends IgxForOfDirec this._bScrollInternal = false; } const scrollOffset = this.fixedUpdateAllElements(this._virtScrollPosition); - - this._zone.onStable.pipe(first()).subscribe(() => { - this.dc.instance._viewContainer.element.nativeElement.style.transform = `translateY(${-scrollOffset}px)`; - }); + runInInjectionContext(this._injector, () => { + afterNextRender({ + write: () => { + this.dc.instance._viewContainer.element.nativeElement.style.transform = `translateY(${-scrollOffset}px)`; + } + }); + }); this.cdr.markForCheck(); } From 751d526237e02b887fae639fd58ba8c9f6699479 Mon Sep 17 00:00:00 2001 From: MKirova Date: Mon, 12 Jan 2026 14:47:34 +0200 Subject: [PATCH 05/32] chore(*): Clean performance observer and custom styles. --- .../src/app/grid/grid.component.html | 2 +- .../igniteui-angular/grids/grid/src/grid-base.directive.ts | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/projects/igniteui-angular-performance/src/app/grid/grid.component.html b/projects/igniteui-angular-performance/src/app/grid/grid.component.html index 377941618c5..dbc647f41e7 100644 --- a/projects/igniteui-angular-performance/src/app/grid/grid.component.html +++ b/projects/igniteui-angular-performance/src/app/grid/grid.component.html @@ -1,6 +1,6 @@
col.field); From eb38e63bae6c94d644f430d5bb2465480b21f475 Mon Sep 17 00:00:00 2001 From: MKirova Date: Mon, 12 Jan 2026 16:10:52 +0200 Subject: [PATCH 06/32] chore(*): Add btn to scroll 100 times in the grids and measure long tasks. --- .../src/app/app.component.html | 4 ++++ .../src/app/app.component.ts | 22 ++++++++++++++++++- .../app/pivot-grid/pivot-grid.component.ts | 4 ++-- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/projects/igniteui-angular-performance/src/app/app.component.html b/projects/igniteui-angular-performance/src/app/app.component.html index 8ca8b694e34..277913f006f 100644 --- a/projects/igniteui-angular-performance/src/app/app.component.html +++ b/projects/igniteui-angular-performance/src/app/app.component.html @@ -5,6 +5,10 @@ {{ route.title }} } + +
diff --git a/projects/igniteui-angular-performance/src/app/app.component.ts b/projects/igniteui-angular-performance/src/app/app.component.ts index 109d49db6d3..d25206dadf1 100644 --- a/projects/igniteui-angular-performance/src/app/app.component.ts +++ b/projects/igniteui-angular-performance/src/app/app.component.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, ViewChild } from '@angular/core'; import { RouterLink, RouterOutlet, Routes } from '@angular/router'; import { IgxButtonDirective } from 'igniteui-angular'; import { routes } from './app.routes'; @@ -11,4 +11,24 @@ import { routes } from './app.routes'; }) export class AppComponent { protected routes: Routes = routes; + + @ViewChild(RouterOutlet) outlet!: RouterOutlet; + + public async OnPerfTest() { + const longTask = []; + const observer = new PerformanceObserver((list) => { + longTask.push(...list.getEntries()); + }); + observer.observe({ entryTypes: ['longtask'] }); + const grid = (this.outlet.component as any).grid || (this.outlet.component as any).pivotGrid; + for (let i = 0; i < 100; i++) { + grid.navigateTo(i * 50); + await new Promise(r => setTimeout(r, 50)); + } + const sum = longTask.reduce((acc, task) => acc + task.duration, 0); + const avgTime = sum / longTask.length; + console.log('Long Tasks:'+ longTask.length + ", ", 'Average Long Task Time:', avgTime); + observer.disconnect(); + + } } diff --git a/projects/igniteui-angular-performance/src/app/pivot-grid/pivot-grid.component.ts b/projects/igniteui-angular-performance/src/app/pivot-grid/pivot-grid.component.ts index e6d9f8593af..9070c7202a8 100644 --- a/projects/igniteui-angular-performance/src/app/pivot-grid/pivot-grid.component.ts +++ b/projects/igniteui-angular-performance/src/app/pivot-grid/pivot-grid.component.ts @@ -182,9 +182,9 @@ export class PivotGridComponent { sortDirection: SortingDirection.None }, { - fullDate: false, + fullDate: true, quarters: true, - months: false, + months: true, }), ], values: [ From afaa5d78e3e3c6e9bdbfdd4efdfa83c6d3a04639 Mon Sep 17 00:00:00 2001 From: MKirova Date: Tue, 13 Jan 2026 17:20:01 +0200 Subject: [PATCH 07/32] chore(*): Update a few places where top offset is still used. --- .../src/directives/for-of/for_of.directive.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts b/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts index 77419755d3b..56c6f77d9f8 100644 --- a/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts +++ b/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts @@ -433,7 +433,7 @@ export class IgxForOfDirective extends IgxForOfToken extends IgxForOfToken extends IgxForOfToken Date: Wed, 14 Jan 2026 13:41:37 +0200 Subject: [PATCH 08/32] chore(*): Fix kbNav that still used top offset. --- .../igniteui-angular/grids/core/src/grid-navigation.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/igniteui-angular/grids/core/src/grid-navigation.service.ts b/projects/igniteui-angular/grids/core/src/grid-navigation.service.ts index bc2ea569236..c38de8ee19c 100644 --- a/projects/igniteui-angular/grids/core/src/grid-navigation.service.ts +++ b/projects/igniteui-angular/grids/core/src/grid-navigation.service.ts @@ -520,7 +520,8 @@ export class IgxGridNavigationService { return Math.ceil(this.grid.headerContainer.scrollPosition); } public get containerTopOffset() { - return parseInt(this.grid.verticalScrollContainer.dc.instance._viewContainer.element.nativeElement.style.top, 10); + const transform = this.grid.verticalScrollContainer.dc.instance._viewContainer.element.nativeElement.style.transform + return Number(transform.match(/translateY\((-?\d+\.?\d*)px\)/)?.[1]) } protected getColumnUnpinnedIndex(visibleColumnIndex: number) { From 2b1c08d5bb8bea9a366590509bdf1ee7863dfdaf Mon Sep 17 00:00:00 2001 From: MKirova Date: Wed, 14 Jan 2026 16:45:38 +0200 Subject: [PATCH 09/32] chore(*): Run initial check on the data on init. --- .../directives/src/directives/for-of/for_of.directive.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts b/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts index 56c6f77d9f8..78639f7293f 100644 --- a/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts +++ b/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts @@ -109,7 +109,9 @@ export class IgxForOfDirective extends IgxForOfToken extends IgxForOfToken Date: Wed, 14 Jan 2026 17:48:19 +0200 Subject: [PATCH 10/32] chore(*): Update test with new check for transform. --- .../src/directives/for-of/for_of.directive.spec.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.spec.ts b/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.spec.ts index 68a390706b4..5b0e44db0cd 100644 --- a/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.spec.ts +++ b/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.spec.ts @@ -249,15 +249,17 @@ describe('IgxForOf directive -', () => { it('should update vertical scroll offsets if igxForOf changes. ', () => { fix.componentInstance.scrollTop(5); fix.detectChanges(); + let transform = displayContainer.style.transform; - expect(parseInt(displayContainer.style.top, 10)).toEqual(-5); + expect(parseInt(transform.slice(transform.indexOf('(') + 1, transform.indexOf(')')), 10)).toEqual(-5); spyOn(fix.componentInstance.parentVirtDir.chunkLoad, 'emit'); fix.componentInstance.data = [{ 1: 1, 2: 2, 3: 3, 4: 4 }]; fix.detectChanges(); - expect(parseInt(displayContainer.style.top, 10)).toEqual(0); + transform = displayContainer.style.transform; + expect(parseInt(transform.slice(transform.indexOf('(') + 1, transform.indexOf(')')), 10)).toEqual(0); expect(fix.componentInstance.parentVirtDir.chunkLoad.emit).toHaveBeenCalledTimes(1); }); From 6cb59bd309c26ebcbe8fbd0b29895e147e09cd08 Mon Sep 17 00:00:00 2001 From: MKirova Date: Fri, 16 Jan 2026 12:04:40 +0200 Subject: [PATCH 11/32] chore(*): Update debounce times and top offset checks in tests. --- .../grids/grid/src/grid-keyBoardNav.spec.ts | 9 ++++----- .../grid.multi-row-layout.integration.spec.ts | 4 ++-- .../hierarchical-grid.virtualization.spec.ts | 20 +++++++++---------- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/projects/igniteui-angular/grids/grid/src/grid-keyBoardNav.spec.ts b/projects/igniteui-angular/grids/grid/src/grid-keyBoardNav.spec.ts index 8b48210269f..ed6b6eb148c 100644 --- a/projects/igniteui-angular/grids/grid/src/grid-keyBoardNav.spec.ts +++ b/projects/igniteui-angular/grids/grid/src/grid-keyBoardNav.spec.ts @@ -16,7 +16,7 @@ import { IgxGridGroupByRowComponent } from './groupby-row.component'; import { CellType } from 'igniteui-angular/grids/core'; import { DefaultSortingStrategy, SortingDirection } from 'igniteui-angular/core'; -const DEBOUNCETIME = 30; +const DEBOUNCETIME = 50; describe('IgxGrid - Keyboard navigation #grid', () => { @@ -426,7 +426,7 @@ describe('IgxGrid - Keyboard navigation #grid', () => { fix.detectChanges(); selectedCell = fix.componentInstance.selectedCell; - expect(parseInt(displayContainer.style.top, 10)).toBeLessThanOrEqual(-1 * (grid.rowHeight - bottomCellVisibleHeight)); + expect(grid.navigation.containerTopOffset).toBeLessThanOrEqual(-1 * (grid.rowHeight - bottomCellVisibleHeight)); expect(displayContainer.parentElement.scrollTop).toEqual(0); expect(selectedCell.value).toEqual(40); expect(selectedCell.column.field).toMatch('1'); @@ -439,12 +439,11 @@ describe('IgxGrid - Keyboard navigation #grid', () => { fix.componentInstance.data = fix.componentInstance.generateData(1000); fix.detectChanges(); - const displayContainer = GridFunctions.getGridDisplayContainer(fix).nativeElement; fix.componentInstance.scrollTop(25); await wait(DEBOUNCETIME); fix.detectChanges(); - expect(displayContainer.style.top).toEqual('-25px'); + expect(grid.navigation.containerTopOffset).toEqual(-25); const cell = grid.gridAPI.get_cell_by_index(1, '1'); UIInteractions.simulateClickAndSelectEvent(cell); await wait(); @@ -458,7 +457,7 @@ describe('IgxGrid - Keyboard navigation #grid', () => { fix.detectChanges(); fix.detectChanges(); - expect(displayContainer.style.top).toEqual('0px'); + expect(grid.navigation.containerTopOffset).toEqual(0); expect(fix.componentInstance.selectedCell.value).toEqual(0); expect(fix.componentInstance.selectedCell.column.field).toMatch('1'); }); diff --git a/projects/igniteui-angular/grids/grid/src/grid.multi-row-layout.integration.spec.ts b/projects/igniteui-angular/grids/grid/src/grid.multi-row-layout.integration.spec.ts index 5295a492f6f..12692d5eda7 100644 --- a/projects/igniteui-angular/grids/grid/src/grid.multi-row-layout.integration.spec.ts +++ b/projects/igniteui-angular/grids/grid/src/grid.multi-row-layout.integration.spec.ts @@ -857,7 +857,7 @@ describe('IgxGrid - multi-row-layout Integration #grid - ', () => { const lastIndex = grid.data.length + grid.groupsRecords.length - 1; grid.verticalScrollContainer.scrollTo(lastIndex); - await wait(16); // needed because of throttleTime on the resize observer + await wait(50); // needed because of throttleTime on scroll fixture.detectChanges(); const scrollTop = grid.verticalScrollContainer.getScroll().scrollTop; @@ -868,7 +868,7 @@ describe('IgxGrid - multi-row-layout Integration #grid - ', () => { expect(scrolledToBottom).toBeTruthy(); const lastRowOffset = grid.rowList.last.element.nativeElement.offsetTop + - grid.rowList.last.element.nativeElement.offsetHeight + parseInt(tbody.children[0].children[0].style.top, 10); + grid.rowList.last.element.nativeElement.offsetHeight + grid.navigation.containerTopOffset; expect(lastRowOffset).toEqual(tbody.scrollHeight); }); diff --git a/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.virtualization.spec.ts b/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.virtualization.spec.ts index 59dab92f738..e87748d96fd 100644 --- a/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.virtualization.spec.ts +++ b/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.virtualization.spec.ts @@ -173,7 +173,7 @@ describe('IgxHierarchicalGrid Virtualization #hGrid', () => { await wait(100); fixture.detectChanges(); const startIndex = hierarchicalGrid.verticalScrollContainer.state.startIndex; - const topOffset = GridFunctions.getGridDisplayContainer(fixture).nativeElement.style.top; + const topOffset = hierarchicalGrid.navigation.containerTopOffset; const secondRow = hierarchicalGrid.dataRowList.toArray()[1]; // expand second row (secondRow.nativeElement.children[0] as HTMLElement).click(); @@ -182,8 +182,8 @@ describe('IgxHierarchicalGrid Virtualization #hGrid', () => { expect(hierarchicalGrid.verticalScrollContainer.state.startIndex).toEqual(startIndex); expect( - parseInt(GridFunctions.getGridDisplayContainer(fixture).nativeElement.style.top, 10) - - parseInt(topOffset, 10) + hierarchicalGrid.navigation.containerTopOffset - + topOffset ).toBeLessThanOrEqual(1); (secondRow.nativeElement.children[0] as HTMLElement).click(); @@ -192,8 +192,8 @@ describe('IgxHierarchicalGrid Virtualization #hGrid', () => { // collapse second row expect(hierarchicalGrid.verticalScrollContainer.state.startIndex).toEqual(startIndex); expect( - parseInt(GridFunctions.getGridDisplayContainer(fixture).nativeElement.style.top, 10) - - parseInt(topOffset, 10) + hierarchicalGrid.navigation.containerTopOffset - + topOffset ).toBeLessThanOrEqual(1); }); @@ -231,7 +231,7 @@ describe('IgxHierarchicalGrid Virtualization #hGrid', () => { await firstValueFrom(hierarchicalGrid.verticalScrollContainer.chunkLoad); fixture.detectChanges(); const startIndex = hierarchicalGrid.verticalScrollContainer.state.startIndex; - const topOffset = GridFunctions.getGridDisplayContainer(fixture).nativeElement.style.top; + const topOffset = hierarchicalGrid.navigation.containerTopOffset; const secondRow = hierarchicalGrid.rowList.toArray()[2]; // expand second row (secondRow.nativeElement.children[0] as HTMLElement).click(); @@ -240,8 +240,8 @@ describe('IgxHierarchicalGrid Virtualization #hGrid', () => { expect(hierarchicalGrid.verticalScrollContainer.state.startIndex).toEqual(startIndex); expect( - parseInt(GridFunctions.getGridDisplayContainer(fixture).nativeElement.style.top, 10) - - parseInt(topOffset, 10) + hierarchicalGrid.navigation.containerTopOffset - + topOffset ).toBeLessThanOrEqual(1); (secondRow.nativeElement.children[0] as HTMLElement).click(); @@ -250,8 +250,8 @@ describe('IgxHierarchicalGrid Virtualization #hGrid', () => { // collapse second row expect(hierarchicalGrid.verticalScrollContainer.state.startIndex).toEqual(startIndex); expect( - parseInt(GridFunctions.getGridDisplayContainer(fixture).nativeElement.style.top, 10) - - parseInt(topOffset, 10) + hierarchicalGrid.navigation.containerTopOffset - + topOffset ).toBeLessThanOrEqual(1); }); From f2cf55a7756fe502ec83a78a3513c326f02d85b9 Mon Sep 17 00:00:00 2001 From: MKirova Date: Fri, 16 Jan 2026 17:48:55 +0200 Subject: [PATCH 12/32] chore(*): Set and cache scrollAmount on hscroll too. --- .../directives/src/directives/for-of/for_of.directive.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts b/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts index 78639f7293f..ab212726270 100644 --- a/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts +++ b/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts @@ -1097,13 +1097,14 @@ export class IgxForOfDirective extends IgxForOfToken Date: Fri, 16 Jan 2026 18:18:19 +0200 Subject: [PATCH 13/32] chore(*): Cache scrollAmount in base onScroll too. --- .../directives/src/directives/for-of/for_of.directive.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts b/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts index ab212726270..5ee3eaaaea7 100644 --- a/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts +++ b/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts @@ -903,8 +903,9 @@ export class IgxForOfDirective extends IgxForOfToken Date: Fri, 16 Jan 2026 19:08:21 +0200 Subject: [PATCH 14/32] chore(*): Debounce a bit more for scroll related operations due to throttle. --- .../igniteui-angular/grids/grid/src/grid-keyBoardNav.spec.ts | 5 +++-- .../grids/grid/src/grid-mrl-keyboard-nav.spec.ts | 2 +- .../grids/grid/src/grid.master-detail.spec.ts | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/projects/igniteui-angular/grids/grid/src/grid-keyBoardNav.spec.ts b/projects/igniteui-angular/grids/grid/src/grid-keyBoardNav.spec.ts index ed6b6eb148c..55cf3f68274 100644 --- a/projects/igniteui-angular/grids/grid/src/grid-keyBoardNav.spec.ts +++ b/projects/igniteui-angular/grids/grid/src/grid-keyBoardNav.spec.ts @@ -16,7 +16,7 @@ import { IgxGridGroupByRowComponent } from './groupby-row.component'; import { CellType } from 'igniteui-angular/grids/core'; import { DefaultSortingStrategy, SortingDirection } from 'igniteui-angular/core'; -const DEBOUNCETIME = 50; +const DEBOUNCETIME = 60; describe('IgxGrid - Keyboard navigation #grid', () => { @@ -287,7 +287,7 @@ describe('IgxGrid - Keyboard navigation #grid', () => { it('should allow navigating up', async () => { grid.verticalScrollContainer.scrollTo(104); - await wait(); + await wait(DEBOUNCETIME); fix.detectChanges(); const cell = grid.gridAPI.get_cell_by_index(100, 'value'); @@ -548,6 +548,7 @@ describe('IgxGrid - Keyboard navigation #grid', () => { expect(fix.componentInstance.selectedCell.value).toEqual(10); expect(fix.componentInstance.selectedCell.column.field).toMatch('1'); UIInteractions.triggerKeyDownEvtUponElem('arrowleft', grid.tbody.nativeElement, true); + fix.detectChanges(); await wait(DEBOUNCETIME); fix.detectChanges(); diff --git a/projects/igniteui-angular/grids/grid/src/grid-mrl-keyboard-nav.spec.ts b/projects/igniteui-angular/grids/grid/src/grid-mrl-keyboard-nav.spec.ts index 902c33ca6ff..ec653c97a6e 100644 --- a/projects/igniteui-angular/grids/grid/src/grid-mrl-keyboard-nav.spec.ts +++ b/projects/igniteui-angular/grids/grid/src/grid-mrl-keyboard-nav.spec.ts @@ -12,7 +12,7 @@ import { CellType, IGridCellEventArgs, IgxColumnComponent, IgxGridMRLNavigationS import { IgxColumnLayoutComponent } from 'igniteui-angular/grids/core'; import { DefaultSortingStrategy, SortingDirection } from 'igniteui-angular/core'; -const DEBOUNCE_TIME = 30; +const DEBOUNCE_TIME = 60; const CELL_CSS_CLASS = '.igx-grid__td'; const ROW_CSS_CLASS = '.igx-grid__tr'; const CELL_BLOCK = `.${GRID_MRL_BLOCK}`; diff --git a/projects/igniteui-angular/grids/grid/src/grid.master-detail.spec.ts b/projects/igniteui-angular/grids/grid/src/grid.master-detail.spec.ts index 3315c47d56c..74c22a49068 100644 --- a/projects/igniteui-angular/grids/grid/src/grid.master-detail.spec.ts +++ b/projects/igniteui-angular/grids/grid/src/grid.master-detail.spec.ts @@ -16,7 +16,7 @@ import { IgxCheckboxComponent } from 'igniteui-angular/checkbox'; import { IgxInputDirective, IgxInputGroupComponent } from 'igniteui-angular/input-group'; import { IgxPaginatorComponent } from 'igniteui-angular/paginator'; -const DEBOUNCE_TIME = 30; +const DEBOUNCE_TIME = 60; const ROW_TAG = 'igx-grid-row'; const GROUP_ROW_TAG = 'igx-grid-groupby-row'; const SUMMARY_ROW_TAG = 'igx-grid-summary-row'; From b8f28894ddc110fedfa4afbe52f995e234408f61 Mon Sep 17 00:00:00 2001 From: MKirova Date: Mon, 19 Jan 2026 11:05:21 +0200 Subject: [PATCH 15/32] chore(*): Pass new data ref on delete. --- projects/igniteui-angular/grids/core/src/api.service.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/igniteui-angular/grids/core/src/api.service.ts b/projects/igniteui-angular/grids/core/src/api.service.ts index 2a9ac35fe6a..69e7d75f4f4 100644 --- a/projects/igniteui-angular/grids/core/src/api.service.ts +++ b/projects/igniteui-angular/grids/core/src/api.service.ts @@ -334,6 +334,7 @@ export class GridBaseAPIService implements GridServiceType { grid.transactions.add(transaction, grid.data[index]); } else { grid.data.splice(index, 1); + grid.data = cloneArray(grid.data); } } else { const state: State = grid.transactions.getState(rowID); From fc7fb344696994eaf2275e2b40f9abcf1a978daf Mon Sep 17 00:00:00 2001 From: MKirova Date: Mon, 19 Jan 2026 11:53:59 +0200 Subject: [PATCH 16/32] chore(*): Recalc sizes on scroll due to variable sizes. --- .../directives/src/directives/for-of/for_of.directive.ts | 1 + .../src/grid-actions/grid-pinning-actions.component.spec.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts b/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts index 5ee3eaaaea7..0b27d86c0e7 100644 --- a/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts +++ b/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts @@ -1701,6 +1701,7 @@ export class IgxGridForOfDirective extends IgxForOfDirec afterNextRender({ write: () => { this.dc.instance._viewContainer.element.nativeElement.style.transform = `translateY(${-scrollOffset}px)`; + this._zone.onStable.pipe(first()).subscribe(this.recalcUpdateSizes.bind(this)); } }); }); diff --git a/projects/igniteui-angular/grids/core/src/grid-actions/grid-pinning-actions.component.spec.ts b/projects/igniteui-angular/grids/core/src/grid-actions/grid-pinning-actions.component.spec.ts index f5e53ee37a2..a29a9c8121d 100644 --- a/projects/igniteui-angular/grids/core/src/grid-actions/grid-pinning-actions.component.spec.ts +++ b/projects/igniteui-angular/grids/core/src/grid-actions/grid-pinning-actions.component.spec.ts @@ -9,7 +9,7 @@ import { SampleTestData } from '../../../../test-utils/sample-test-data.spec'; import { IgxActionStripComponent } from 'igniteui-angular/action-strip'; import { IgxGridComponent } from 'igniteui-angular/grids/grid'; - +const DEBOUNCETIME = 60; describe('igxGridPinningActions #grid ', () => { let fixture; let actionStrip: IgxActionStripComponent; @@ -65,7 +65,7 @@ describe('igxGridPinningActions #grid ', () => { jumpButton.triggerEventHandler('click', new Event('click')); await wait(); fixture.detectChanges(); - await wait(); + await wait(DEBOUNCETIME); fixture.detectChanges(); const secondToLastVisible = grid.rowList.toArray()[grid.rowList.length - 2]; From 4fdb6e59aa06e51d1d31e77d78dbbecb7c1a2716 Mon Sep 17 00:00:00 2001 From: MKirova Date: Mon, 19 Jan 2026 12:08:51 +0200 Subject: [PATCH 17/32] chore(*): Add debounce for kbnav. --- .../grids/grid/src/grid.master-detail.spec.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/projects/igniteui-angular/grids/grid/src/grid.master-detail.spec.ts b/projects/igniteui-angular/grids/grid/src/grid.master-detail.spec.ts index 74c22a49068..58c4caeaedb 100644 --- a/projects/igniteui-angular/grids/grid/src/grid.master-detail.spec.ts +++ b/projects/igniteui-angular/grids/grid/src/grid.master-detail.spec.ts @@ -607,6 +607,7 @@ describe('IgxGrid Master Detail #grid', () => { await wait(DEBOUNCE_TIME); fix.detectChanges(); await wait(DEBOUNCE_TIME); + fix.detectChanges(); const lastRow = grid.gridAPI.get_row_by_index(52); expect(lastRow).not.toBeUndefined(); @@ -1022,7 +1023,7 @@ describe('IgxGrid Master Detail #grid', () => { // check row can be expanded const lastRow = grid.rowList.last; GridFunctions.toggleMasterRow(fix, lastRow); - await wait(); + await wait(DEBOUNCE_TIME); fix.detectChanges(); expect(lastRow.expanded).toBeTruthy(); const lastRowDetail = GridFunctions.getMasterRowDetail(grid.rowList.last); @@ -1124,19 +1125,21 @@ describe('IgxGrid Master Detail #grid', () => { fix.detectChanges(); UIInteractions.triggerEventHandlerKeyDown('ArrowDown', gridContent); + await wait(DEBOUNCE_TIME); fix.detectChanges(); let targetCellElement2 = grid.getCellByColumn(0, 'Address'); expect(targetCellElement2.active).toBeTruthy(); UIInteractions.triggerEventHandlerKeyDown('ArrowDown', gridContent); + await wait(DEBOUNCE_TIME); fix.detectChanges(); const firstRowDetail = GridFunctions.getMasterRowDetail(grid.rowList.first); GridFunctions.verifyMasterDetailRowFocused(firstRowDetail); UIInteractions.triggerEventHandlerKeyDown('ArrowDown', gridContent); - await wait(); + await wait(DEBOUNCE_TIME); fix.detectChanges(); targetCellElement2 = grid.getCellByColumn(2, 'CompanyName'); @@ -1151,19 +1154,21 @@ describe('IgxGrid Master Detail #grid', () => { fix.detectChanges(); UIInteractions.triggerEventHandlerKeyDown('ArrowUp', gridContent); - await wait(); + await wait(DEBOUNCE_TIME); fix.detectChanges(); let targetCellElement2 = grid.getCellByColumn(2, 'CompanyName'); expect(targetCellElement2.active).toBeTruthy(); UIInteractions.triggerEventHandlerKeyDown('ArrowUp', gridContent); + await wait(DEBOUNCE_TIME); fix.detectChanges(); const firstRowDetail = GridFunctions.getMasterRowDetail(grid.rowList.first); GridFunctions.verifyMasterDetailRowFocused(firstRowDetail); UIInteractions.triggerEventHandlerKeyDown('ArrowUp', gridContent); + await wait(DEBOUNCE_TIME); fix.detectChanges(); targetCellElement2 = grid.getCellByColumn(0, 'Address'); From d87fa5dc68bcda452fa89b31ceb81d8c5e09111b Mon Sep 17 00:00:00 2001 From: MKirova Date: Mon, 19 Jan 2026 13:56:38 +0200 Subject: [PATCH 18/32] chore(*): Set amount in GridForOf too. --- .../directives/src/directives/for-of/for_of.directive.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts b/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts index 0b27d86c0e7..cf3a5209ecd 100644 --- a/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts +++ b/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts @@ -1715,6 +1715,7 @@ export class IgxGridForOfDirective extends IgxForOfDirec if (!this.scrollComponent || !parseInt(firstScrollChild.style.width, 10)) { return; } + this.scrollComponent.scrollAmount = scrollAmount; // Updating horizontal chunks const scrollOffset = this.fixedUpdateAllElements(Math.abs(scrollAmount)); if (scrollAmount < 0) { From a3fcc35c35758bf167fdb1603b64bd156607db21 Mon Sep 17 00:00:00 2001 From: MKirova Date: Mon, 19 Jan 2026 14:11:26 +0200 Subject: [PATCH 19/32] chore(*): Trigger change on records added. --- projects/igniteui-angular/grids/core/src/api.service.ts | 1 + projects/igniteui-angular/grids/grid/src/grid-add-row.spec.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/igniteui-angular/grids/core/src/api.service.ts b/projects/igniteui-angular/grids/core/src/api.service.ts index 69e7d75f4f4..e911942e672 100644 --- a/projects/igniteui-angular/grids/core/src/api.service.ts +++ b/projects/igniteui-angular/grids/core/src/api.service.ts @@ -319,6 +319,7 @@ export class GridBaseAPIService implements GridServiceType { grid.transactions.add(transaction); } else { grid.data.push(rowData); + grid.data = cloneArray(grid.data); } grid.validation.markAsTouched(rowId); grid.validation.update(rowId, rowData); diff --git a/projects/igniteui-angular/grids/grid/src/grid-add-row.spec.ts b/projects/igniteui-angular/grids/grid/src/grid-add-row.spec.ts index bc3beb7bfeb..07900d3677f 100644 --- a/projects/igniteui-angular/grids/grid/src/grid-add-row.spec.ts +++ b/projects/igniteui-angular/grids/grid/src/grid-add-row.spec.ts @@ -18,7 +18,7 @@ import { Subject } from 'rxjs'; import { DefaultSortingStrategy, IgxStringFilteringOperand, SortingDirection, TransactionType } from 'igniteui-angular/core'; import { IgxGridMRLNavigationService } from 'igniteui-angular/grids/core'; -const DEBOUNCETIME = 30; +const DEBOUNCETIME = 60; describe('IgxGrid - Row Adding #grid', () => { const GRID_ROW = 'igx-grid-row'; From 3c446e85fb1e94c63398ddd06d2eccccce5bc986 Mon Sep 17 00:00:00 2001 From: MKirova Date: Mon, 19 Jan 2026 14:38:25 +0200 Subject: [PATCH 20/32] chore(*): Make sure diff inits and fix some timing on tests. --- .../directives/src/directives/for-of/for_of.directive.ts | 1 + .../grids/grid/src/grid-cell-selection.spec.ts | 6 +++--- .../igniteui-angular/grids/grid/src/grid.component.spec.ts | 2 +- .../src/hierarchical-grid.virtualization.spec.ts | 6 +++--- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts b/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts index cf3a5209ecd..ffeddba6a14 100644 --- a/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts +++ b/projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts @@ -475,6 +475,7 @@ export class IgxForOfDirective extends IgxForOfToken { } } UIInteractions.triggerKeyDownEvtUponElem('arrowdown', obj.nativeElement, true, false, true); - await wait(50); + await wait(60); fix.detectChanges(); } @@ -1717,7 +1717,7 @@ describe('IgxGrid - Cell selection #grid', () => { const summaryCell = grid.summariesRowList.find(row => row.index === 8) .summaryCells.find(sCell => sCell.visibleColumnIndex === i); UIInteractions.triggerKeyDownEvtUponElem('arrowright', summaryCell.nativeElement, true); - await wait(50); + await wait(60); fix.detectChanges(); } @@ -1726,7 +1726,7 @@ describe('IgxGrid - Cell selection #grid', () => { const sumCell = grid.summariesRowList.find(row => row.index === 8) .summaryCells.find(sCell => sCell.visibleColumnIndex === 5); UIInteractions.triggerKeyDownEvtUponElem('arrowup', sumCell.nativeElement, true); - await wait(50); + await wait(60); fix.detectChanges(); GridSelectionFunctions.verifySelectedRange(grid, 7, 7, 5, 5); diff --git a/projects/igniteui-angular/grids/grid/src/grid.component.spec.ts b/projects/igniteui-angular/grids/grid/src/grid.component.spec.ts index 3a09da1118b..f00c7b7f574 100644 --- a/projects/igniteui-angular/grids/grid/src/grid.component.spec.ts +++ b/projects/igniteui-angular/grids/grid/src/grid.component.spec.ts @@ -2022,7 +2022,7 @@ describe('IgxGrid Component Tests #grid', () => { grid.navigateTo(50, 16); fix.detectChanges(); - await wait(); + await wait(60); fix.detectChanges(); expect(headerRowElement.getAttribute('aria-rowindex')).toBe('1'); diff --git a/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.virtualization.spec.ts b/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.virtualization.spec.ts index e87748d96fd..1f11245f871 100644 --- a/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.virtualization.spec.ts +++ b/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.virtualization.spec.ts @@ -77,17 +77,17 @@ describe('IgxHierarchicalGrid Virtualization #hGrid', () => { elem.scrollTop = 400; fixture.detectChanges(); fixture.componentRef.hostView.detectChanges(); - await wait(30); + await wait(60); fixture.detectChanges(); // collapse and expand the row (firstRow.nativeElement.children[0] as HTMLElement).click(); fixture.detectChanges(); - await wait(30); + await wait(60); fixture.detectChanges(); (firstRow.nativeElement.children[0] as HTMLElement).click(); fixture.detectChanges(); - await wait(30); + await wait(60); fixture.detectChanges(); expect(elem.scrollTop).toBe(400); From 92e3c3715a1fb40461c6ebef22962fe42086dea6 Mon Sep 17 00:00:00 2001 From: MKirova Date: Mon, 19 Jan 2026 15:27:32 +0200 Subject: [PATCH 21/32] chore(*): Fix timing in tests. --- .../grids/grid/src/grid-keyBoardNav.spec.ts | 6 ++---- .../src/hierarchical-grid.navigation.spec.ts | 14 ++++++------- .../hierarchical-grid.virtualization.spec.ts | 2 +- .../src/tree-grid-keyBoardNav.spec.ts | 2 +- .../tree-grid-multi-cell-selection.spec.ts | 20 +++++++++---------- .../tree-grid/src/tree-grid-summaries.spec.ts | 2 +- 6 files changed, 22 insertions(+), 24 deletions(-) diff --git a/projects/igniteui-angular/grids/grid/src/grid-keyBoardNav.spec.ts b/projects/igniteui-angular/grids/grid/src/grid-keyBoardNav.spec.ts index 55cf3f68274..9957bab63e2 100644 --- a/projects/igniteui-angular/grids/grid/src/grid-keyBoardNav.spec.ts +++ b/projects/igniteui-angular/grids/grid/src/grid-keyBoardNav.spec.ts @@ -590,8 +590,7 @@ describe('IgxGrid - Keyboard navigation #grid', () => { await wait(DEBOUNCETIME); fix.detectChanges(); - let scrollContainer = grid.verticalScrollContainer.dc.instance._viewContainer; - let scrollContainerOffset = scrollContainer.element.nativeElement.offsetTop; + let scrollContainerOffset = grid.navigation.containerTopOffset; expect(scrollContainerOffset).toEqual(-25); const cell = grid.gridAPI.get_cell_by_index(1, 'value'); @@ -605,8 +604,7 @@ describe('IgxGrid - Keyboard navigation #grid', () => { await wait(DEBOUNCETIME); fix.detectChanges(); - scrollContainer = grid.verticalScrollContainer.dc.instance._viewContainer; - scrollContainerOffset = scrollContainer.element.nativeElement.offsetTop; + scrollContainerOffset = grid.navigation.containerTopOffset; expect(scrollContainerOffset).toEqual(0); expect(fix.componentInstance.selectedCell.value).toEqual(0); diff --git a/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.navigation.spec.ts b/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.navigation.spec.ts index e9b7ef3f5cc..f3f2f6f6c14 100644 --- a/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.navigation.spec.ts +++ b/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.navigation.spec.ts @@ -108,7 +108,7 @@ describe('IgxHierarchicalGrid Navigation', () => { const childGridContent = fixture.debugElement.queryAll(By.css(GRID_CONTENT_CLASS))[1]; UIInteractions.triggerEventHandlerKeyDown('arrowdown', childGridContent, false, false, false); fixture.detectChanges(); - await wait(); + await wait(60); // parent should scroll down so that cell in child is in view. const selectedCell = fixture.componentInstance.selectedCell; const selectedCellElem = childGrid.gridAPI.get_cell_by_index(selectedCell.row.index, selectedCell.column.field) as IgxGridCellComponent; @@ -615,7 +615,7 @@ describe('IgxHierarchicalGrid Navigation', () => { await wait(DEBOUNCE_TIME); hierarchicalGrid.navigateTo(2); - await wait(); + await wait(DEBOUNCE_TIME); const cell = hierarchicalGrid.gridAPI.get_cell_by_index(2, 'ChildLevels'); UIInteractions.simulateDoubleClickAndSelectEvent(cell); @@ -623,7 +623,7 @@ describe('IgxHierarchicalGrid Navigation', () => { await wait(); UIInteractions.triggerKeyDownEvtUponElem('tab', cell.nativeElement, true, false, true); - fixture.detectChanges(); + fixture.detectChanges(DEBOUNCE_TIME); await wait(DEBOUNCE_TIME); const activeEl = document.activeElement; @@ -725,17 +725,17 @@ describe('IgxHierarchicalGrid Navigation', () => { it('should allow navigating up from parent into nested child grid', async () => { hierarchicalGrid.verticalScrollContainer.scrollTo(2); - await wait(); + await wait(DEBOUNCE_TIME); fixture.detectChanges(); const child = hierarchicalGrid.gridAPI.getChildGrids(false)[0]; const lastIndex = child.dataView.length - 1; child.verticalScrollContainer.scrollTo(lastIndex); - await wait(); + await wait(DEBOUNCE_TIME); fixture.detectChanges(); child.verticalScrollContainer.scrollTo(lastIndex); - await wait(); + await wait(DEBOUNCE_TIME); fixture.detectChanges(); const parentCell = hierarchicalGrid.gridAPI.get_cell_by_index(2, 'ID'); @@ -935,7 +935,7 @@ describe('IgxHierarchicalGrid Navigation', () => { firstChildGrid.verticalScrollContainer.scrollTo(9); fixture.detectChanges(); - await wait(); + await wait(DEBOUNCE_TIME); const firstChildCell = firstChildGrid.gridAPI.get_cell_by_index(9, 'Col1'); GridFunctions.focusCell(fixture, firstChildCell); diff --git a/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.virtualization.spec.ts b/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.virtualization.spec.ts index 1f11245f871..bf78ac72c00 100644 --- a/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.virtualization.spec.ts +++ b/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.virtualization.spec.ts @@ -394,7 +394,7 @@ describe('IgxHierarchicalGrid Virtualization #hGrid', () => { elem.scrollTop = 400; fixture.detectChanges(); fixture.componentRef.hostView.detectChanges(); - await wait(); + await wait(60); fixture.detectChanges(); expect(ri.gridScroll.emit).toHaveBeenCalled(); diff --git a/projects/igniteui-angular/grids/tree-grid/src/tree-grid-keyBoardNav.spec.ts b/projects/igniteui-angular/grids/tree-grid/src/tree-grid-keyBoardNav.spec.ts index 26a57acba1e..2968d8fa019 100644 --- a/projects/igniteui-angular/grids/tree-grid/src/tree-grid-keyBoardNav.spec.ts +++ b/projects/igniteui-angular/grids/tree-grid/src/tree-grid-keyBoardNav.spec.ts @@ -10,7 +10,7 @@ import { DebugElement } from '@angular/core'; import { firstValueFrom } from 'rxjs'; import { CellType } from 'igniteui-angular/grids/core'; -const DEBOUNCETIME = 30; +const DEBOUNCETIME = 60; describe('IgxTreeGrid - Key Board Navigation #tGrid', () => { beforeEach(waitForAsync(() => { diff --git a/projects/igniteui-angular/grids/tree-grid/src/tree-grid-multi-cell-selection.spec.ts b/projects/igniteui-angular/grids/tree-grid/src/tree-grid-multi-cell-selection.spec.ts index ea22664eb2c..7c3462c7d24 100644 --- a/projects/igniteui-angular/grids/tree-grid/src/tree-grid-multi-cell-selection.spec.ts +++ b/projects/igniteui-angular/grids/tree-grid/src/tree-grid-multi-cell-selection.spec.ts @@ -223,7 +223,7 @@ describe('IgxTreeGrid - Multi Cell selection #tGrid', () => { for (let i = 9; i < 14; i++) { cell = treeGrid.gridAPI.get_cell_by_index(i, 'Age'); UIInteractions.triggerKeyDownEvtUponElem('arrowdown', cell.nativeElement, true, false, true); - await wait(30); + await wait(60); fix.detectChanges(); } @@ -232,7 +232,7 @@ describe('IgxTreeGrid - Multi Cell selection #tGrid', () => { cell = treeGrid.gridAPI.get_cell_by_index(14, 'Age'); UIInteractions.triggerKeyDownEvtUponElem('arrowright', cell.nativeElement, true, false, true); - await wait(30); + await wait(60); fix.detectChanges(); expect(selectionChangeSpy).toHaveBeenCalledTimes(6); @@ -240,7 +240,7 @@ describe('IgxTreeGrid - Multi Cell selection #tGrid', () => { cell = treeGrid.gridAPI.get_cell_by_index(14, 'OnPTO'); UIInteractions.triggerKeyDownEvtUponElem('arrowright', cell.nativeElement, true, false, true); - await wait(30); + await wait(60); fix.detectChanges(); expect(selectionChangeSpy).toHaveBeenCalledTimes(7); @@ -249,7 +249,7 @@ describe('IgxTreeGrid - Multi Cell selection #tGrid', () => { for (let i = 14; i > 3; i--) { cell = treeGrid.gridAPI.get_cell_by_index(i, 'HireDate'); UIInteractions.triggerKeyDownEvtUponElem('arrowup', cell.nativeElement, true, false, true); - await wait(30); + await wait(60); fix.detectChanges(); } @@ -259,7 +259,7 @@ describe('IgxTreeGrid - Multi Cell selection #tGrid', () => { for (let i = 4; i > 2; i--) { cell = treeGrid.gridAPI.get_cell_by_index(3, treeGrid.columnList.get(i).field); UIInteractions.triggerKeyDownEvtUponElem('arrowleft', cell.nativeElement, true, false, true); - await wait(30); + await wait(60); fix.detectChanges(); } @@ -385,7 +385,7 @@ describe('IgxTreeGrid - Multi Cell selection #tGrid', () => { .summaryCells.find(sCell => sCell.visibleColumnIndex === 1); } UIInteractions.triggerKeyDownEvtUponElem('arrowdown', cellObj.nativeElement, true, false, true); - await wait(30); + await wait(60); fix.detectChanges(); } @@ -396,7 +396,7 @@ describe('IgxTreeGrid - Multi Cell selection #tGrid', () => { const cellObject = treeGrid.summariesRowList.find(row => row.index === 16) .summaryCells.find(sCell => sCell.visibleColumnIndex === i); UIInteractions.triggerKeyDownEvtUponElem('arrowright', cellObject.nativeElement, true, false, true); - await wait(30); + await wait(60); fix.detectChanges(); } @@ -405,7 +405,7 @@ describe('IgxTreeGrid - Multi Cell selection #tGrid', () => { const summaryCell = treeGrid.summariesRowList.find(row => row.index === 16) .summaryCells.find(sCell => sCell.visibleColumnIndex === 3); UIInteractions.triggerKeyDownEvtUponElem('arrowup', summaryCell.nativeElement, true, false, true); - await wait(30); + await wait(60); fix.detectChanges(); expect(selectionChangeSpy).toHaveBeenCalledTimes(6); GridSelectionFunctions.verifySelectedRange(treeGrid, 8, 15, 1, 3); @@ -425,7 +425,7 @@ describe('IgxTreeGrid - Multi Cell selection #tGrid', () => { const gridContent = GridFunctions.getGridContent(fix); for (let i = 8; i < 16; i++) { UIInteractions.triggerEventHandlerKeyDown('arrowdown', gridContent, false, true); - await wait(30); + await wait(60); fix.detectChanges(); } @@ -433,7 +433,7 @@ describe('IgxTreeGrid - Multi Cell selection #tGrid', () => { GridSelectionFunctions.verifyCellsRegionSelected(treeGrid, 8, 15, 1, 1); UIInteractions.triggerEventHandlerKeyDown('arrowdown', gridContent); - await wait(30); + await wait(60); fix.detectChanges(); GridSelectionFunctions.verifySelectedRange(treeGrid, 17, 17, 1, 1); diff --git a/projects/igniteui-angular/grids/tree-grid/src/tree-grid-summaries.spec.ts b/projects/igniteui-angular/grids/tree-grid/src/tree-grid-summaries.spec.ts index bd5777ceb4e..1a3a348bcc0 100644 --- a/projects/igniteui-angular/grids/tree-grid/src/tree-grid-summaries.spec.ts +++ b/projects/igniteui-angular/grids/tree-grid/src/tree-grid-summaries.spec.ts @@ -1706,7 +1706,7 @@ describe('IgxTreeGrid - Summaries #tGrid', () => { fix.detectChanges(); (treeGrid as any).scrollTo(23, 0, 0); fix.detectChanges(); - await wait(30); + await wait(60); fix.detectChanges(); let row = treeGrid.getRowByKey(15); From db7bfb777f616494e7d4129688afdb6e9946a944 Mon Sep 17 00:00:00 2001 From: MKirova Date: Mon, 19 Jan 2026 16:21:29 +0200 Subject: [PATCH 22/32] chore(*): Bump timing if tests a bit more. --- .../grids/grid/src/grid-cell-selection.spec.ts | 4 ++-- .../grids/tree-grid/src/tree-grid-search.spec.ts | 2 +- .../src/simple-combo/simple-combo.component.spec.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/igniteui-angular/grids/grid/src/grid-cell-selection.spec.ts b/projects/igniteui-angular/grids/grid/src/grid-cell-selection.spec.ts index e640160ff29..139b203aede 100644 --- a/projects/igniteui-angular/grids/grid/src/grid-cell-selection.spec.ts +++ b/projects/igniteui-angular/grids/grid/src/grid-cell-selection.spec.ts @@ -1586,14 +1586,14 @@ describe('IgxGrid - Cell selection #grid', () => { obj = grid.gridAPI.get_row_by_index(i); } UIInteractions.triggerKeyDownEvtUponElem('arrowdown', obj.nativeElement, true, false, true); - await wait(50); + await wait(60); fix.detectChanges(); } expect(selectionChangeSpy).toHaveBeenCalledTimes(5); cell = grid.gridAPI.get_cell_by_index(10, 'Name'); UIInteractions.triggerKeyDownEvtUponElem('arrowleft', cell.nativeElement, true, false, true); - await wait(50); + await wait(60); fix.detectChanges(); expect(selectionChangeSpy).toHaveBeenCalledTimes(6); diff --git a/projects/igniteui-angular/grids/tree-grid/src/tree-grid-search.spec.ts b/projects/igniteui-angular/grids/tree-grid/src/tree-grid-search.spec.ts index a9cfd4007e9..44e4dbc7802 100644 --- a/projects/igniteui-angular/grids/tree-grid/src/tree-grid-search.spec.ts +++ b/projects/igniteui-angular/grids/tree-grid/src/tree-grid-search.spec.ts @@ -326,7 +326,7 @@ describe('IgxTreeGrid - search API #tGrid', () => { for (let i = 0; i < 14; i++) { const expectedValue = expectedValues[i % expectedValues.length]; const actualCount = treeGrid.findNext('an'); - await wait(50); + await wait(60); fix.detectChanges(); expect(actualCount).toBe(expectedValues.length); verifyActiveCellValue(fixNativeElement, expectedValue); diff --git a/projects/igniteui-angular/simple-combo/src/simple-combo/simple-combo.component.spec.ts b/projects/igniteui-angular/simple-combo/src/simple-combo/simple-combo.component.spec.ts index 1030bcc7ab5..ccb9d19a1d8 100644 --- a/projects/igniteui-angular/simple-combo/src/simple-combo/simple-combo.component.spec.ts +++ b/projects/igniteui-angular/simple-combo/src/simple-combo/simple-combo.component.spec.ts @@ -2803,7 +2803,7 @@ describe('IgxSimpleCombo', () => { try { // combo should not throw from the selection getter at this point grid.navigateTo(fixture.componentInstance.data.length - 1, 0); - await wait(30); + await wait(60); fixture.detectChanges(); } catch (error) { fail(`Test failed with error: ${error}`) From 75fe9194c0bd438557bd10bcfd0dd713c87ac407 Mon Sep 17 00:00:00 2001 From: MKirova Date: Mon, 19 Jan 2026 16:35:18 +0200 Subject: [PATCH 23/32] chore(*): Add a bit more time in loops that navigate. --- .../grids/grid/src/grid-cell-selection.spec.ts | 2 +- .../grids/grid/src/grid-keyBoardNav.spec.ts | 2 +- .../tree-grid/src/tree-grid-multi-cell-selection.spec.ts | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/projects/igniteui-angular/grids/grid/src/grid-cell-selection.spec.ts b/projects/igniteui-angular/grids/grid/src/grid-cell-selection.spec.ts index 139b203aede..bbe221c5dd1 100644 --- a/projects/igniteui-angular/grids/grid/src/grid-cell-selection.spec.ts +++ b/projects/igniteui-angular/grids/grid/src/grid-cell-selection.spec.ts @@ -1586,7 +1586,7 @@ describe('IgxGrid - Cell selection #grid', () => { obj = grid.gridAPI.get_row_by_index(i); } UIInteractions.triggerKeyDownEvtUponElem('arrowdown', obj.nativeElement, true, false, true); - await wait(60); + await wait(100); fix.detectChanges(); } diff --git a/projects/igniteui-angular/grids/grid/src/grid-keyBoardNav.spec.ts b/projects/igniteui-angular/grids/grid/src/grid-keyBoardNav.spec.ts index 9957bab63e2..501a87563ac 100644 --- a/projects/igniteui-angular/grids/grid/src/grid-keyBoardNav.spec.ts +++ b/projects/igniteui-angular/grids/grid/src/grid-keyBoardNav.spec.ts @@ -16,7 +16,7 @@ import { IgxGridGroupByRowComponent } from './groupby-row.component'; import { CellType } from 'igniteui-angular/grids/core'; import { DefaultSortingStrategy, SortingDirection } from 'igniteui-angular/core'; -const DEBOUNCETIME = 60; +const DEBOUNCETIME = 100; describe('IgxGrid - Keyboard navigation #grid', () => { diff --git a/projects/igniteui-angular/grids/tree-grid/src/tree-grid-multi-cell-selection.spec.ts b/projects/igniteui-angular/grids/tree-grid/src/tree-grid-multi-cell-selection.spec.ts index 7c3462c7d24..0eb47d4cd42 100644 --- a/projects/igniteui-angular/grids/tree-grid/src/tree-grid-multi-cell-selection.spec.ts +++ b/projects/igniteui-angular/grids/tree-grid/src/tree-grid-multi-cell-selection.spec.ts @@ -223,7 +223,7 @@ describe('IgxTreeGrid - Multi Cell selection #tGrid', () => { for (let i = 9; i < 14; i++) { cell = treeGrid.gridAPI.get_cell_by_index(i, 'Age'); UIInteractions.triggerKeyDownEvtUponElem('arrowdown', cell.nativeElement, true, false, true); - await wait(60); + await wait(100); fix.detectChanges(); } @@ -249,7 +249,7 @@ describe('IgxTreeGrid - Multi Cell selection #tGrid', () => { for (let i = 14; i > 3; i--) { cell = treeGrid.gridAPI.get_cell_by_index(i, 'HireDate'); UIInteractions.triggerKeyDownEvtUponElem('arrowup', cell.nativeElement, true, false, true); - await wait(60); + await wait(100); fix.detectChanges(); } @@ -425,7 +425,7 @@ describe('IgxTreeGrid - Multi Cell selection #tGrid', () => { const gridContent = GridFunctions.getGridContent(fix); for (let i = 8; i < 16; i++) { UIInteractions.triggerEventHandlerKeyDown('arrowdown', gridContent, false, true); - await wait(60); + await wait(100); fix.detectChanges(); } From 571a9d6e4f03349e83bc1d6021486d1f1735fcd7 Mon Sep 17 00:00:00 2001 From: MKirova Date: Wed, 21 Jan 2026 11:29:30 +0200 Subject: [PATCH 24/32] chore(*): Document breaking change and comment out related tests. --- CHANGELOG.md | 7 +++++++ projects/igniteui-angular/grids/grid/src/grid.crud.spec.ts | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ef406c514f..790ea47e3b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes for each version of this project will be documented in this file. +## 21.2.0 + +### Breaking Changes + +- `igxForOf`, `igxGrid`, `igxTreeGrid`, `igxHierarchicalGrid`, `igxPivotGrid` + - original `data` array mutations (like adding/removing/moving records in the original array) are no longer detected automatically. Components need an array ref change for the change to be detected. + ## 21.1.0 # Localization(i18n) diff --git a/projects/igniteui-angular/grids/grid/src/grid.crud.spec.ts b/projects/igniteui-angular/grids/grid/src/grid.crud.spec.ts index a1e0ee794bf..afd33098689 100644 --- a/projects/igniteui-angular/grids/grid/src/grid.crud.spec.ts +++ b/projects/igniteui-angular/grids/grid/src/grid.crud.spec.ts @@ -43,7 +43,8 @@ describe('IgxGrid - CRUD operations #grid', () => { expect(grid.rowList.length).toEqual(expectedLength); }); - it('should support adding rows by manipulating the `data` @Input of the grid', () => { + // No longer supported - array mutations are not detected automatically, need ref change. + xit('should support adding rows by manipulating the `data` @Input of the grid', () => { // Add to the data array without changing the reference // with manual detection for (let i = 0; i < 10; i++) { @@ -103,7 +104,8 @@ describe('IgxGrid - CRUD operations #grid', () => { expect(grid.data.length).toEqual(8); }); - it('should support removing rows by manipulating the `data` @Input of the grid', () => { + // No longer supported - array mutations are not detected automatically, need ref change. + xit('should support removing rows by manipulating the `data` @Input of the grid', () => { // Remove from the data array without changing the reference // with manual detection fix.componentInstance.data.pop(); From fd21b71bc21538b329349e587f9dbbb62a52396a Mon Sep 17 00:00:00 2001 From: MKirova Date: Wed, 21 Jan 2026 11:38:14 +0200 Subject: [PATCH 25/32] chore(*): Bump up debounce time to 60ms so tests do not flicker. --- .../hierarchical-grid/src/hierarchical-grid.navigation.spec.ts | 2 +- .../grids/tree-grid/src/tree-grid-search.spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.navigation.spec.ts b/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.navigation.spec.ts index f3f2f6f6c14..50d4f8ba7a1 100644 --- a/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.navigation.spec.ts +++ b/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.navigation.spec.ts @@ -11,7 +11,7 @@ import { GridFunctions } from '../../../test-utils/grid-functions.spec'; import { IGridCellEventArgs, IgxColumnComponent, IgxGridCellComponent, IgxGridNavigationService } from 'igniteui-angular/grids/core'; import { IPathSegment } from 'igniteui-angular/core'; -const DEBOUNCE_TIME = 50; +const DEBOUNCE_TIME = 60; const GRID_CONTENT_CLASS = '.igx-grid__tbody-content'; const GRID_FOOTER_CLASS = '.igx-grid__tfoot'; diff --git a/projects/igniteui-angular/grids/tree-grid/src/tree-grid-search.spec.ts b/projects/igniteui-angular/grids/tree-grid/src/tree-grid-search.spec.ts index 44e4dbc7802..1be5a638a49 100644 --- a/projects/igniteui-angular/grids/tree-grid/src/tree-grid-search.spec.ts +++ b/projects/igniteui-angular/grids/tree-grid/src/tree-grid-search.spec.ts @@ -337,7 +337,7 @@ describe('IgxTreeGrid - search API #tGrid', () => { for (let i = 13; i >= 0; i--) { const expectedValue = expectedValues[i % expectedValues.length]; const actualCount = treeGrid.findPrev('an'); - await wait(50); + await wait(60); fix.detectChanges(); expect(actualCount).toBe(expectedValues.length); verifyActiveCellValue(fixNativeElement, expectedValue); From 2a4b72d5064adf19a8667590e74bceeab9f64fee Mon Sep 17 00:00:00 2001 From: MKirova Date: Wed, 21 Jan 2026 15:27:22 +0200 Subject: [PATCH 26/32] chore(*): Disable throttle for tests to make them more stable. --- .../grids/grid/src/grid-base.directive.ts | 15 +++++++++++++-- .../grids/grid/src/grid-cell-selection.spec.ts | 4 ++++ .../grids/grid/src/grid-keyBoardNav.spec.ts | 4 ++++ .../grids/grid/src/grid-mrl-keyboard-nav.spec.ts | 4 ++++ .../src/hierarchical-grid.navigation.spec.ts | 10 ++++++++++ .../src/hierarchical-grid.virtualization.spec.ts | 4 ++++ .../tree-grid/src/tree-grid-keyBoardNav.spec.ts | 4 ++++ 7 files changed, 43 insertions(+), 2 deletions(-) diff --git a/projects/igniteui-angular/grids/grid/src/grid-base.directive.ts b/projects/igniteui-angular/grids/grid/src/grid-base.directive.ts index cdf841a1388..4f83f6ae1fa 100644 --- a/projects/igniteui-angular/grids/grid/src/grid-base.directive.ts +++ b/projects/igniteui-angular/grids/grid/src/grid-base.directive.ts @@ -29,7 +29,8 @@ import { ViewChildren, ViewContainerRef, DOCUMENT, - inject + inject, + InjectionToken } from '@angular/core'; import { areEqualArrays, @@ -110,6 +111,15 @@ import { CharSeparatedValueData, DropPosition, FilterMode, getUUID, GridCellMerg import { getCurrentI18n, getNumberFormatter, IResourceChangeEventArgs, } from 'igniteui-i18n-core'; import { I18N_FORMATTER } from 'igniteui-angular/core'; +/** + * Injection token for setting the throttle time used in grid virtual scroll. + * @hidden + */ +export const SCROLL_THROTTLE_TIME = /*@__PURE__*/new InjectionToken('SCROLL_THROTTLE_TIME', { + factory: () => 40 +}); + + interface IMatchInfoCache { row: any; index: number; @@ -162,6 +172,7 @@ export abstract class IgxGridBaseDirective implements GridType, protected _diTransactions = inject(IgxGridTransaction, { optional: true }); /** @hidden @internal */ public i18nFormatter = inject(I18N_FORMATTER); + private readonly THROTTLE_TIME = inject(SCROLL_THROTTLE_TIME); /** * Gets/Sets the display time for the row adding snackbar notification. @@ -3714,7 +3725,7 @@ export abstract class IgxGridBaseDirective implements GridType, this.scrollNotify.pipe( filter(() => !this._init), - throttleTime(40, animationFrameScheduler, { leading: false, trailing: true }), + throttleTime(this.THROTTLE_TIME, animationFrameScheduler, { leading: false, trailing: true }), destructor ) .subscribe((event) => { diff --git a/projects/igniteui-angular/grids/grid/src/grid-cell-selection.spec.ts b/projects/igniteui-angular/grids/grid/src/grid-cell-selection.spec.ts index bbe221c5dd1..45555aba658 100644 --- a/projects/igniteui-angular/grids/grid/src/grid-cell-selection.spec.ts +++ b/projects/igniteui-angular/grids/grid/src/grid-cell-selection.spec.ts @@ -1,6 +1,7 @@ import { TestBed, fakeAsync, tick, ComponentFixture, waitForAsync } from '@angular/core/testing'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; import { IgxGridComponent } from './public_api'; +import { SCROLL_THROTTLE_TIME } from './../src/grid-base.directive'; import { SelectionWithScrollsComponent, SelectionWithTransactionsComponent, @@ -978,6 +979,9 @@ describe('IgxGrid - Cell selection #grid', () => { let gridContent: DebugElement; beforeEach(() => { + TestBed.configureTestingModule({ + providers: [{ provide: SCROLL_THROTTLE_TIME, useValue: 0 }] + }); fix = TestBed.createComponent(SelectionWithScrollsComponent); fix.detectChanges(); grid = fix.componentInstance.grid; diff --git a/projects/igniteui-angular/grids/grid/src/grid-keyBoardNav.spec.ts b/projects/igniteui-angular/grids/grid/src/grid-keyBoardNav.spec.ts index 501a87563ac..3a9e46bba17 100644 --- a/projects/igniteui-angular/grids/grid/src/grid-keyBoardNav.spec.ts +++ b/projects/igniteui-angular/grids/grid/src/grid-keyBoardNav.spec.ts @@ -15,6 +15,7 @@ import { DebugElement, QueryList } from '@angular/core'; import { IgxGridGroupByRowComponent } from './groupby-row.component'; import { CellType } from 'igniteui-angular/grids/core'; import { DefaultSortingStrategy, SortingDirection } from 'igniteui-angular/core'; +import { SCROLL_THROTTLE_TIME } from './../src/grid-base.directive'; const DEBOUNCETIME = 100; @@ -222,6 +223,9 @@ describe('IgxGrid - Keyboard navigation #grid', () => { })); beforeEach(() => { + TestBed.configureTestingModule({ + providers: [{ provide: SCROLL_THROTTLE_TIME, useValue: 0 }] + }); fix = TestBed.createComponent(VirtualGridComponent); fix.detectChanges(); grid = fix.componentInstance.grid; diff --git a/projects/igniteui-angular/grids/grid/src/grid-mrl-keyboard-nav.spec.ts b/projects/igniteui-angular/grids/grid/src/grid-mrl-keyboard-nav.spec.ts index ec653c97a6e..f9d223a6441 100644 --- a/projects/igniteui-angular/grids/grid/src/grid-mrl-keyboard-nav.spec.ts +++ b/projects/igniteui-angular/grids/grid/src/grid-mrl-keyboard-nav.spec.ts @@ -11,6 +11,7 @@ import { GridFunctions, GRID_MRL_BLOCK } from '../../../test-utils/grid-function import { CellType, IGridCellEventArgs, IgxColumnComponent, IgxGridMRLNavigationService } from 'igniteui-angular/grids/core'; import { IgxColumnLayoutComponent } from 'igniteui-angular/grids/core'; import { DefaultSortingStrategy, SortingDirection } from 'igniteui-angular/core'; +import { SCROLL_THROTTLE_TIME } from './../src/grid-base.directive'; const DEBOUNCE_TIME = 60; const CELL_CSS_CLASS = '.igx-grid__td'; @@ -28,6 +29,9 @@ describe('IgxGrid Multi Row Layout - Keyboard navigation #grid', () => { })); beforeEach(() => { + TestBed.configureTestingModule({ + providers: [{ provide: SCROLL_THROTTLE_TIME, useValue: 0 }] + }); fix = TestBed.createComponent(ColumnLayoutTestComponent); }); diff --git a/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.navigation.spec.ts b/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.navigation.spec.ts index 50d4f8ba7a1..6e0982ee583 100644 --- a/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.navigation.spec.ts +++ b/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.navigation.spec.ts @@ -10,6 +10,7 @@ import { clearGridSubs, setupHierarchicalGridScrollDetection } from '../../../te import { GridFunctions } from '../../../test-utils/grid-functions.spec'; import { IGridCellEventArgs, IgxColumnComponent, IgxGridCellComponent, IgxGridNavigationService } from 'igniteui-angular/grids/core'; import { IPathSegment } from 'igniteui-angular/core'; +import { SCROLL_THROTTLE_TIME } from './../../grid/src/grid-base.directive'; const DEBOUNCE_TIME = 60; const GRID_CONTENT_CLASS = '.igx-grid__tbody-content'; @@ -37,11 +38,20 @@ describe('IgxHierarchicalGrid Navigation', () => { jasmine.DEFAULT_TIMEOUT_INTERVAL = defaultTimeout * 2; })); + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + providers: [{ provide: SCROLL_THROTTLE_TIME, useValue: 0 }] + }); + })); + afterAll(() => jasmine.DEFAULT_TIMEOUT_INTERVAL = defaultTimeout); describe('IgxHierarchicalGrid Basic Navigation #hGrid', () => { beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + providers: [{ provide: SCROLL_THROTTLE_TIME, useValue: 0 }] + }); fixture = TestBed.createComponent(IgxHierarchicalGridTestBaseComponent); fixture.detectChanges(); hierarchicalGrid = fixture.componentInstance.hgrid; diff --git a/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.virtualization.spec.ts b/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.virtualization.spec.ts index bf78ac72c00..2629a404895 100644 --- a/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.virtualization.spec.ts +++ b/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.virtualization.spec.ts @@ -14,6 +14,7 @@ import { IgxHierarchicalGridDefaultComponent } from '../../../test-utils/hierarc import { firstValueFrom } from 'rxjs'; import { FilteringExpressionsTree, FilteringLogic, IgxStringFilteringOperand } from 'igniteui-angular/core'; import { IgxGridNavigationService } from 'igniteui-angular/grids/core'; +import { SCROLL_THROTTLE_TIME } from './../../grid/src/grid-base.directive'; describe('IgxHierarchicalGrid Virtualization #hGrid', () => { let fixture; @@ -33,6 +34,9 @@ describe('IgxHierarchicalGrid Virtualization #hGrid', () => { })); beforeEach(() => { + TestBed.configureTestingModule({ + providers: [{ provide: SCROLL_THROTTLE_TIME, useValue: 0 }] + }); fixture = TestBed.createComponent(IgxHierarchicalGridTestBaseComponent); fixture.detectChanges(); hierarchicalGrid = fixture.componentInstance.hgrid; diff --git a/projects/igniteui-angular/grids/tree-grid/src/tree-grid-keyBoardNav.spec.ts b/projects/igniteui-angular/grids/tree-grid/src/tree-grid-keyBoardNav.spec.ts index 2968d8fa019..d3b4718661e 100644 --- a/projects/igniteui-angular/grids/tree-grid/src/tree-grid-keyBoardNav.spec.ts +++ b/projects/igniteui-angular/grids/tree-grid/src/tree-grid-keyBoardNav.spec.ts @@ -9,6 +9,7 @@ import { GridFunctions } from '../../../test-utils/grid-functions.spec'; import { DebugElement } from '@angular/core'; import { firstValueFrom } from 'rxjs'; import { CellType } from 'igniteui-angular/grids/core'; +import { SCROLL_THROTTLE_TIME } from './../../grid/src/grid-base.directive'; const DEBOUNCETIME = 60; @@ -396,6 +397,9 @@ describe('IgxTreeGrid - Key Board Navigation #tGrid', () => { const treeColumns = ['ID', 'Name', 'HireDate', 'Age', 'OnPTO']; beforeEach(() => { + TestBed.configureTestingModule({ + providers: [{ provide: SCROLL_THROTTLE_TIME, useValue: 0 }] + }); fix = TestBed.createComponent(IgxTreeGridWithScrollsComponent); fix.detectChanges(); treeGrid = fix.componentInstance.treeGrid; From df7271750fff279f297599f2cd0a9ea25122d1e8 Mon Sep 17 00:00:00 2001 From: MKirova Date: Wed, 21 Jan 2026 15:44:49 +0200 Subject: [PATCH 27/32] chore(*): Add a bit throttle for a few tests that have resize observer issue. --- .../src/hierarchical-grid.navigation.spec.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.navigation.spec.ts b/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.navigation.spec.ts index 6e0982ee583..45a1b87d69a 100644 --- a/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.navigation.spec.ts +++ b/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.navigation.spec.ts @@ -964,6 +964,9 @@ describe('IgxHierarchicalGrid Navigation', () => { describe('IgxHierarchicalGrid Navigation API #hGrid', () => { beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + providers: [{ provide: SCROLL_THROTTLE_TIME, useValue: 1 }] + }); fixture = TestBed.createComponent(IgxHierarchicalGridMultiLayoutComponent); fixture.detectChanges(); hierarchicalGrid = fixture.componentInstance.hgrid; @@ -1014,16 +1017,16 @@ describe('IgxHierarchicalGrid Navigation', () => { }; hierarchicalGrid.navigation.navigateToChildGrid([targetRoot, targetNested], () => { - fixture.detectChanges(); + fixture.detectChanges(); const childGrid = hierarchicalGrid.gridAPI.getChildGrid([targetRoot]).nativeElement; - expect(childGrid).not.toBe(undefined); + expect(childGrid).not.toBe(undefined); const childGridNested = hierarchicalGrid.gridAPI.getChildGrid([targetRoot, targetNested]).nativeElement; - expect(childGridNested).not.toBe(undefined); + expect(childGridNested).not.toBe(undefined); - const parentBottom = childGrid.getBoundingClientRect().bottom; - const parentTop = childGrid.getBoundingClientRect().top; - // check it's in view within its parent - expect(childGridNested.getBoundingClientRect().bottom <= parentBottom && childGridNested.getBoundingClientRect().top >= parentTop); + const parentBottom = childGrid.getBoundingClientRect().bottom; + const parentTop = childGrid.getBoundingClientRect().top; + // check it's in view within its parent + expect(childGridNested.getBoundingClientRect().bottom <= parentBottom && childGridNested.getBoundingClientRect().top >= parentTop); done(); }); }); From ae89901190edfde2535083d9341bd07262c3f98a Mon Sep 17 00:00:00 2001 From: MKirova Date: Wed, 21 Jan 2026 15:56:19 +0200 Subject: [PATCH 28/32] chore(*): Add to throttle 0 other tests as well. --- .../grids/grid/src/grid.master-detail.spec.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/projects/igniteui-angular/grids/grid/src/grid.master-detail.spec.ts b/projects/igniteui-angular/grids/grid/src/grid.master-detail.spec.ts index 58c4caeaedb..497caf776ae 100644 --- a/projects/igniteui-angular/grids/grid/src/grid.master-detail.spec.ts +++ b/projects/igniteui-angular/grids/grid/src/grid.master-detail.spec.ts @@ -15,6 +15,7 @@ import { GridSummaryCalculationMode, IgxStringFilteringOperand, SortingDirection import { IgxCheckboxComponent } from 'igniteui-angular/checkbox'; import { IgxInputDirective, IgxInputGroupComponent } from 'igniteui-angular/input-group'; import { IgxPaginatorComponent } from 'igniteui-angular/paginator'; +import { SCROLL_THROTTLE_TIME } from './../src/grid-base.directive'; const DEBOUNCE_TIME = 60; const ROW_TAG = 'igx-grid-row'; @@ -43,6 +44,12 @@ describe('IgxGrid Master Detail #grid', () => { }).compileComponents(); })); + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + providers: [{ provide: SCROLL_THROTTLE_TIME, useValue: 0 }] + }); + })); + describe('Basic', () => { beforeEach(fakeAsync(() => { fix = TestBed.createComponent(DefaultGridMasterDetailComponent); From 3d9b89299bcd9ca87462c7b46cc828b96823a2f6 Mon Sep 17 00:00:00 2001 From: MKirova Date: Wed, 21 Jan 2026 16:06:36 +0200 Subject: [PATCH 29/32] chore(*): Add 0 throttle to selection since there's range select with scroll. --- .../tree-grid/src/tree-grid-multi-cell-selection.spec.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/projects/igniteui-angular/grids/tree-grid/src/tree-grid-multi-cell-selection.spec.ts b/projects/igniteui-angular/grids/tree-grid/src/tree-grid-multi-cell-selection.spec.ts index 0eb47d4cd42..a948ed1b17f 100644 --- a/projects/igniteui-angular/grids/tree-grid/src/tree-grid-multi-cell-selection.spec.ts +++ b/projects/igniteui-angular/grids/tree-grid/src/tree-grid-multi-cell-selection.spec.ts @@ -11,6 +11,7 @@ import { UIInteractions, wait } from '../../../test-utils/ui-interactions.spec'; import { GridSelectionFunctions, GridSummaryFunctions, GridFunctions } from '../../../test-utils/grid-functions.spec'; import { GridSelectionMode } from 'igniteui-angular/grids/core'; import { IgxStringFilteringOperand } from 'igniteui-angular/core'; +import { SCROLL_THROTTLE_TIME } from './../../grid/src/grid-base.directive'; describe('IgxTreeGrid - Multi Cell selection #tGrid', () => { @@ -26,6 +27,12 @@ describe('IgxTreeGrid - Multi Cell selection #tGrid', () => { }).compileComponents(); })); + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + providers: [{ provide: SCROLL_THROTTLE_TIME, useValue: 0 }] + }); + })); + describe('Flat Data', () => { let fix; let treeGrid; From 2a143a9538f28e7a356d9d9acf0c306c1de85f36 Mon Sep 17 00:00:00 2001 From: MKirova Date: Wed, 21 Jan 2026 16:27:45 +0200 Subject: [PATCH 30/32] chore(*): More of SCROLL_THROTTLE_TIME 0. --- .../src/tree-grid-multi-cell-selection.spec.ts | 18 ++++++++++++------ .../tree-grid/src/tree-grid-summaries.spec.ts | 7 +++++++ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/projects/igniteui-angular/grids/tree-grid/src/tree-grid-multi-cell-selection.spec.ts b/projects/igniteui-angular/grids/tree-grid/src/tree-grid-multi-cell-selection.spec.ts index a948ed1b17f..b8269b86a65 100644 --- a/projects/igniteui-angular/grids/tree-grid/src/tree-grid-multi-cell-selection.spec.ts +++ b/projects/igniteui-angular/grids/tree-grid/src/tree-grid-multi-cell-selection.spec.ts @@ -27,18 +27,15 @@ describe('IgxTreeGrid - Multi Cell selection #tGrid', () => { }).compileComponents(); })); - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - providers: [{ provide: SCROLL_THROTTLE_TIME, useValue: 0 }] - }); - })); - describe('Flat Data', () => { let fix; let treeGrid; let detect; beforeEach(() => { + TestBed.configureTestingModule({ + providers: [{ provide: SCROLL_THROTTLE_TIME, useValue: 0 }] + }); fix = TestBed.createComponent(IgxTreeGridSelectionKeyComponent); fix.detectChanges(); treeGrid = fix.componentInstance.treeGrid; @@ -563,6 +560,9 @@ describe('IgxTreeGrid - Multi Cell selection #tGrid', () => { let detect; beforeEach(() => { + TestBed.configureTestingModule({ + providers: [{ provide: SCROLL_THROTTLE_TIME, useValue: 0 }] + }); fix = TestBed.createComponent(IgxTreeGridSelectionComponent); fix.detectChanges(); treeGrid = fix.componentInstance.treeGrid; @@ -675,6 +675,9 @@ describe('IgxTreeGrid - Multi Cell selection #tGrid', () => { let treeGrid; beforeEach(() => { + TestBed.configureTestingModule({ + providers: [{ provide: SCROLL_THROTTLE_TIME, useValue: 0 }] + }); fix = TestBed.createComponent(IgxTreeGridSelectionWithTransactionComponent); fix.detectChanges(); treeGrid = fix.componentInstance.treeGrid; @@ -805,6 +808,9 @@ describe('IgxTreeGrid - Multi Cell selection #tGrid', () => { let treeGrid; beforeEach(() => { + TestBed.configureTestingModule({ + providers: [{ provide: SCROLL_THROTTLE_TIME, useValue: 0 }] + }); fix = TestBed.createComponent(IgxTreeGridFKeySelectionWithTransactionComponent); fix.detectChanges(); treeGrid = fix.componentInstance.treeGrid; diff --git a/projects/igniteui-angular/grids/tree-grid/src/tree-grid-summaries.spec.ts b/projects/igniteui-angular/grids/tree-grid/src/tree-grid-summaries.spec.ts index 1a3a348bcc0..b27b063dbd7 100644 --- a/projects/igniteui-angular/grids/tree-grid/src/tree-grid-summaries.spec.ts +++ b/projects/igniteui-angular/grids/tree-grid/src/tree-grid-summaries.spec.ts @@ -15,6 +15,7 @@ import { DebugElement } from '@angular/core'; import { IgxTreeGridComponent } from './tree-grid.component'; import { IgxSummaryRow, IgxTreeGridRow } from 'igniteui-angular/grids/core'; import { IgxNumberFilteringOperand } from 'igniteui-angular/core'; +import { SCROLL_THROTTLE_TIME } from './../../grid/src/grid-base.directive'; describe('IgxTreeGrid - Summaries #tGrid', () => { const DEBOUNCETIME = 30; @@ -33,6 +34,12 @@ describe('IgxTreeGrid - Summaries #tGrid', () => { }).compileComponents(); })); + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + providers: [{ provide: SCROLL_THROTTLE_TIME, useValue: 0 }] + }); + })); + describe('', () => { let fix; let treeGrid: IgxTreeGridComponent; From 95da8e58a1badc61b5ec37c89208638064acc053 Mon Sep 17 00:00:00 2001 From: MKirova Date: Wed, 21 Jan 2026 16:37:41 +0200 Subject: [PATCH 31/32] chore(*): Prevent resize observer error. --- .../src/hierarchical-grid.virtualization.spec.ts | 2 +- .../grids/tree-grid/src/tree-grid-multi-cell-selection.spec.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.virtualization.spec.ts b/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.virtualization.spec.ts index 2629a404895..0bd2f1cb326 100644 --- a/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.virtualization.spec.ts +++ b/projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid.virtualization.spec.ts @@ -35,7 +35,7 @@ describe('IgxHierarchicalGrid Virtualization #hGrid', () => { beforeEach(() => { TestBed.configureTestingModule({ - providers: [{ provide: SCROLL_THROTTLE_TIME, useValue: 0 }] + providers: [{ provide: SCROLL_THROTTLE_TIME, useValue: 1 }] }); fixture = TestBed.createComponent(IgxHierarchicalGridTestBaseComponent); fixture.detectChanges(); diff --git a/projects/igniteui-angular/grids/tree-grid/src/tree-grid-multi-cell-selection.spec.ts b/projects/igniteui-angular/grids/tree-grid/src/tree-grid-multi-cell-selection.spec.ts index b8269b86a65..404bc18748c 100644 --- a/projects/igniteui-angular/grids/tree-grid/src/tree-grid-multi-cell-selection.spec.ts +++ b/projects/igniteui-angular/grids/tree-grid/src/tree-grid-multi-cell-selection.spec.ts @@ -34,7 +34,7 @@ describe('IgxTreeGrid - Multi Cell selection #tGrid', () => { beforeEach(() => { TestBed.configureTestingModule({ - providers: [{ provide: SCROLL_THROTTLE_TIME, useValue: 0 }] + providers: [{ provide: SCROLL_THROTTLE_TIME, useValue: 1 }] }); fix = TestBed.createComponent(IgxTreeGridSelectionKeyComponent); fix.detectChanges(); From fd25a137553705f204929781087c0aa535796d73 Mon Sep 17 00:00:00 2001 From: MKirova Date: Wed, 21 Jan 2026 16:46:51 +0200 Subject: [PATCH 32/32] chore(*): Add SCROLL_THROTTLE_TIME 0 for more grid tests. --- .../igniteui-angular/grids/grid/src/grid.component.spec.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/projects/igniteui-angular/grids/grid/src/grid.component.spec.ts b/projects/igniteui-angular/grids/grid/src/grid.component.spec.ts index f00c7b7f574..2db66e08b36 100644 --- a/projects/igniteui-angular/grids/grid/src/grid.component.spec.ts +++ b/projects/igniteui-angular/grids/grid/src/grid.component.spec.ts @@ -18,6 +18,7 @@ import { AsyncPipe } from '@angular/common'; import { setElementSize, ymd } from '../../../test-utils/helper-utils.spec'; import { FilteringExpressionsTree, FilteringLogic, getComponentSize, GridColumnDataType, IgxNumberFilteringOperand, IgxStringFilteringOperand, ISortingExpression, ɵSize, SortingDirection } from 'igniteui-angular/core'; import { IgxPaginatorComponent, IgxPaginatorContentDirective } from 'igniteui-angular/paginator'; +import { SCROLL_THROTTLE_TIME } from './../src/grid-base.directive'; describe('IgxGrid Component Tests #grid', () => { const MIN_COL_WIDTH = '136px'; @@ -41,6 +42,12 @@ describe('IgxGrid Component Tests #grid', () => { .compileComponents(); })); + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [{ provide: SCROLL_THROTTLE_TIME, useValue: 0 }] + }); + }); + it('should initialize a grid with columns from markup', () => { const fix = TestBed.createComponent(IgxGridMarkupDeclarationComponent); fix.detectChanges();