Skip to content

Commit 139f635

Browse files
committed
fix(grid): clean up focusout handling and emit activeNodeChange event
1 parent d726059 commit 139f635

2 files changed

Lines changed: 2 additions & 8 deletions

File tree

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3711,14 +3711,6 @@ export abstract class IgxGridBaseDirective implements GridType,
37113711
const destructor = takeUntil<any>(this.destroy$);
37123712
fromEvent(this.nativeElement, 'focusout').pipe(filter(() => !!this.navigation.activeNode), destructor).subscribe((event) => {
37133713
const activeNode = this.navigation.activeNode;
3714-
3715-
// In hierarchical grids, activation can be cleared by child highlight logic, leaving an empty object.
3716-
// If merging is enabled, clear cached active indexes to allow merge state to restore.
3717-
if (!Object.keys(activeNode).length && this.hasCellsToMerge) {
3718-
this._activeRowIndexes = null;
3719-
this.notifyChanges();
3720-
}
3721-
37223714
if (!this.crudService.cell && !!activeNode &&
37233715
((event.target === this.tbody.nativeElement && activeNode.row >= 0 &&
37243716
activeNode.row < this.dataView.length)

projects/igniteui-angular/grids/hierarchical-grid/src/hierarchical-grid-navigation.service.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,8 @@ export class IgxHierarchicalGridNavigationService extends IgxGridNavigationServi
365365
if (this.activeNode && Object.keys(this.activeNode).length) {
366366
this.activeNode = Object.assign({} as IActiveNode);
367367
}
368+
369+
this.grid.activeNodeChange.emit();
368370
}
369371

370372
private hasNextTarget(grid: GridType, index: number, isNext: boolean) {

0 commit comments

Comments
 (0)