Skip to content

Commit d8a0e17

Browse files
committed
fix(IgxGrid): remove cell focus when change the row expansion state #7506
1 parent 1569803 commit d8a0e17

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

projects/igniteui-angular/src/lib/grids/api.service.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -588,12 +588,6 @@ export class GridBaseAPIService <T extends IgxGridBaseDirective & GridType> {
588588
if (grid.rowEditable) {
589589
grid.endEdit(true);
590590
}
591-
const eventKey = event && (event as any).key ? (event as any).key.toLowerCase() : null;
592-
if (eventKey && this.isToggleKey(eventKey)) {
593-
(this.grid as any).zone.onStable.pipe(debounceTime(30)).pipe(first()).subscribe(() => {
594-
this.focusActiveCell(rowID);
595-
});
596-
}
597591
}
598592

599593
public get_rec_by_id(rowID) {
@@ -608,16 +602,4 @@ export class GridBaseAPIService <T extends IgxGridBaseDirective & GridType> {
608602
return ROW_COLLAPSE_KEYS.has(key) || ROW_EXPAND_KEYS.has(key);
609603
}
610604

611-
private focusActiveCell(rowID) {
612-
// persist focused cell
613-
const isVirtualized = !this.grid.verticalScrollContainer.dc.instance.notVirtual;
614-
const el = this.grid.selectionService.activeElement;
615-
if (isVirtualized && el) {
616-
const cell = this.get_cell_by_key(rowID, this.grid.visibleColumns[el.column].field);
617-
if (cell) {
618-
cell.nativeElement.focus();
619-
}
620-
}
621-
}
622-
623605
}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ export class IgxGridExpandableCellComponent extends IgxGridCellComponent impleme
6868
*/
6969
public onIndicatorFocus() {
7070
this.gridAPI.submit_value();
71-
this.nativeElement.focus();
7271
}
7372

7473
/**

0 commit comments

Comments
 (0)