From 7749a63cd16c6f87e3a34f0dc02d990df5596476 Mon Sep 17 00:00:00 2001 From: Martin Dragnev Date: Wed, 5 Aug 2026 17:05:28 +0300 Subject: [PATCH 1/4] fix(grid): get only trailing event when throttling vertical scroll --- .../grids/grid/src/grid-base.directive.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 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 556bd30d8ba..26c4f3cb04c 100644 --- a/projects/igniteui-angular/grids/grid/src/grid-base.directive.ts +++ b/projects/igniteui-angular/grids/grid/src/grid-base.directive.ts @@ -110,7 +110,7 @@ import { IgxGridGroupByAreaComponent } from './grouping/grid-group-by-area.compo import { IgxPaginatorToken, type IgxPaginatorComponent } from 'igniteui-angular/paginator'; import { IgxSnackbarComponent } from 'igniteui-angular/snackbar'; import { CharSeparatedValueData, DropPosition, FilterMode, getUUID, GridCellMergeMode, GridKeydownTargetType, GridPagingMode, GridSelectionMode, GridSelectionRange, GridServiceType, GridSummaryPosition, GridType, GridValidationTrigger, IActiveNode, IActiveNodeChangeEventArgs, ICellPosition, IClipboardOptions, IColumnMovingEndEventArgs, IColumnMovingEventArgs, IColumnMovingStartEventArgs, IColumnResizeEventArgs, IColumnSelectionEventArgs, IColumnVisibilityChangedEventArgs, IColumnVisibilityChangingEventArgs, IFilteringEventArgs, IGridCellEventArgs, IGridClipboardEvent, IGridContextMenuEventArgs, IGridEditDoneEventArgs, IGridEditEventArgs, IGridFormGroupCreatedEventArgs, IGridKeydownEventArgs, IGridRowEventArgs, IGridScrollEventArgs, IGridToolbarExportEventArgs, IGridValidationStatusEventArgs, IGX_GRID_SERVICE_BASE, IgxAdvancedFilteringDialogComponent, IgxCell, IgxColumnComponent, IgxColumnGroupComponent, IgxColumnResizingService, IgxDragIndicatorIconDirective, IgxEditRow, IgxExcelStyleHeaderIconDirective, IgxExcelStyleLoadingValuesTemplateDirective, IgxFilteringService, IgxGridBodyDirective, IgxGridCellComponent, IgxGridColumnResizerComponent, IgxGridEmptyTemplateContext, IgxGridEmptyTemplateDirective, IgxGridExcelStyleFilteringComponent, IgxGridFilteringCellComponent, IgxGridFilteringRowComponent, IgxGridHeaderComponent, IgxGridHeaderGroupComponent, IgxGridHeaderRowComponent, IgxGridHeaderTemplateContext, IgxGridLoadingTemplateDirective, IgxGridNavigationService, IgxGridPinningActionsComponent, IgxGridRowDragGhostContext, IgxGridRowEditActionsTemplateContext, IgxGridRowEditTemplateContext, IgxGridRowEditTextTemplateContext, IgxGridRowTemplateContext, IgxGridSelectionService, IgxGridSummaryService, IgxGridTemplateContext, IgxGridToolbarComponent, IgxGridTransaction, IgxGridValidationService, IgxHeaderCollapsedIndicatorDirective, IgxHeaderExpandedIndicatorDirective, IgxHeadSelectorDirective, IgxHeadSelectorTemplateContext, IgxRowAddTextDirective, IgxRowCollapsedIndicatorDirective, IgxRowDirective, IgxRowDragGhostDirective, IgxRowEditActionsDirective, IgxRowEditTabStopDirective, IgxRowEditTemplateDirective, IgxRowEditTextDirective, IgxRowExpandedIndicatorDirective, IgxRowSelectorDirective, IgxRowSelectorTemplateContext, IgxSortAscendingHeaderIconDirective, IgxSortDescendingHeaderIconDirective, IgxSortHeaderIconDirective, IgxSummaryRowComponent, IgxToolbarToken, IPinColumnCancellableEventArgs, IPinColumnEventArgs, IPinningConfig, IPinRowEventArgs, IRowDataCancelableEventArgs, IRowDataEventArgs, IRowDragEndEventArgs, IRowDragStartEventArgs, IRowSelectionEventArgs, IRowToggleEventArgs, ISearchInfo, ISizeInfo, ISortingEventArgs, RowEditPositionStrategy, RowPinningPosition, RowType, WatchChanges } from 'igniteui-angular/grids/core'; -import { getCurrentI18n, getNumberFormatter, IResourceChangeEventArgs, } from 'igniteui-i18n-core'; +import { getCurrentI18n, getNumberFormatter, IResourceChangeEventArgs, } from 'igniteui-i18n-core'; import { I18N_FORMATTER } from 'igniteui-angular/core'; /** @@ -1149,7 +1149,7 @@ export abstract class IgxGridBaseDirective implements GridType, /** @hidden @internal */ public get actionStrip() { - return this.actionStripComponents?.first; + return this.actionStripComponents?.first; } /** @@ -3698,7 +3698,8 @@ export abstract class IgxGridBaseDirective implements GridType, this.throttleTime$.pipe( take(1), switchMap(time => timer(time, this.throttleScheduler)) - ) + ), + { leading: false, trailing: true } ), destructor ) @@ -3746,7 +3747,7 @@ export abstract class IgxGridBaseDirective implements GridType, const overlaySettings = this.overlayService.getOverlayById(event.id)?.settings; // do not hide the advanced filtering overlay on scroll - if (this._advancedFilteringOverlayId === event.id) { + if (this._advancedFilteringOverlayId === event.id) { const instance = event.componentRef.instance as IgxAdvancedFilteringDialogComponent; if (instance) { instance.lastActiveNode = this.navigation.activeNode; @@ -6773,7 +6774,7 @@ export abstract class IgxGridBaseDirective implements GridType, } else if (this.width !== null) { this._columnWidth = Math.max(parseFloat(possibleWidth), this.minColumnWidth) + 'px' } else { - this._columnWidth = this.minColumnWidth + 'px'; + this._columnWidth = this.minColumnWidth + 'px'; } } this._updateColumnDefaultWidths(); From 64fdb65f2ff5caaf80e62701b316ae8eac7e5809 Mon Sep 17 00:00:00 2001 From: Martin Dragnev Date: Wed, 5 Aug 2026 18:12:19 +0300 Subject: [PATCH 2/4] test(h-grid): wait for next animation frame when navigating with ctrl+end --- .../hierarchical-grid/src/hierarchical-grid.navigation.spec.ts | 3 +++ 1 file changed, 3 insertions(+) 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 aa110df550b..2ac44ec27df 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 @@ -370,11 +370,14 @@ describe('IgxHierarchicalGrid Navigation', () => { }); it('should move activation to last data cell in grid when ctrl+end is used.', async () => { + const nextFrame = () => + new Promise((resolve) => requestAnimationFrame(() => resolve())); fixture.autoDetectChanges(); const parentCell = hierarchicalGrid.dataRowList.first.cells.first; GridFunctions.focusCell(fixture, parentCell); UIInteractions.triggerEventHandlerKeyDown('end', baseHGridContent, false, false, true); + await nextFrame(); // because of vertical scroll that now throttles and gets the last scroll event fixture.detectChanges(); await waitForSelectionChange(hierarchicalGrid); From d0fda84a7c958d62e638f859deabdfb966b33ea9 Mon Sep 17 00:00:00 2001 From: Martin Dragnev Date: Wed, 5 Aug 2026 18:25:57 +0300 Subject: [PATCH 3/4] fix(grid): enable leading edge throttling for vertical scroll events --- projects/igniteui-angular/grids/grid/src/grid-base.directive.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 26c4f3cb04c..f489a783b70 100644 --- a/projects/igniteui-angular/grids/grid/src/grid-base.directive.ts +++ b/projects/igniteui-angular/grids/grid/src/grid-base.directive.ts @@ -3699,7 +3699,7 @@ export abstract class IgxGridBaseDirective implements GridType, take(1), switchMap(time => timer(time, this.throttleScheduler)) ), - { leading: false, trailing: true } + { leading: true, trailing: true } ), destructor ) From dc7c8538ad6e312bd7982ea0bb987b7ec085204d Mon Sep 17 00:00:00 2001 From: Martin Dragnev Date: Wed, 5 Aug 2026 18:26:15 +0300 Subject: [PATCH 4/4] chore(*): undo test changes --- .../hierarchical-grid/src/hierarchical-grid.navigation.spec.ts | 3 --- 1 file changed, 3 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 2ac44ec27df..aa110df550b 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 @@ -370,14 +370,11 @@ describe('IgxHierarchicalGrid Navigation', () => { }); it('should move activation to last data cell in grid when ctrl+end is used.', async () => { - const nextFrame = () => - new Promise((resolve) => requestAnimationFrame(() => resolve())); fixture.autoDetectChanges(); const parentCell = hierarchicalGrid.dataRowList.first.cells.first; GridFunctions.focusCell(fixture, parentCell); UIInteractions.triggerEventHandlerKeyDown('end', baseHGridContent, false, false, true); - await nextFrame(); // because of vertical scroll that now throttles and gets the last scroll event fixture.detectChanges(); await waitForSelectionChange(hierarchicalGrid);