Skip to content

Commit 9e18ae5

Browse files
Running grid (selected) event in the angular zone (#12560)
* fix(*): emit cell selection event in the angular zone #11746 * chore(*): fix flickering test for the grid inside igxTabs Co-authored-by: Hristo <[email protected]>
1 parent be3c832 commit 9e18ae5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,7 @@ export class IgxGridCellComponent implements OnInit, OnChanges, OnDestroy, CellT
10691069
this.selectionService.keyboardStateOnFocus(node, this.grid.rangeSelected, this.nativeElement);
10701070
}
10711071
if (this.grid.isCellSelectable && shouldEmitSelection) {
1072-
this.grid.selected.emit({ cell: this.getCellType(), event });
1072+
this.zone.run(() => this.grid.selected.emit({ cell: this.getCellType(), event }));
10731073
}
10741074
}
10751075

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2379,7 +2379,10 @@ describe('IgxGrid Component Tests #grid', () => {
23792379
await wait(100);
23802380
fix.detectChanges();
23812381

2382-
grid.navigateTo(grid.data.length - 1, grid.columnList.length - 1);
2382+
grid.navigateTo(0, grid.columnList.length - 1);
2383+
await wait(100);
2384+
fix.detectChanges();
2385+
grid.navigateTo(grid.data.length - 1);
23832386
await wait(100);
23842387
fix.detectChanges();
23852388

0 commit comments

Comments
 (0)