Skip to content

Commit 09eb84b

Browse files
committed
fix(grid): remove cell activate position argument
1 parent e5119e1 commit 09eb84b

File tree

7 files changed

+13
-14
lines changed

7 files changed

+13
-14
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ export class IgxGridCellComponent implements OnInit, OnChanges, OnDestroy {
733733
*/
734734
pointerdown = (event: PointerEvent) => {
735735
if (this.cellSelectionMode !== GridSelectionMode.multiple) {
736-
this.activate(event, {rowIndex: this.rowIndex, colIndex: this.visibleColumnIndex});
736+
this.activate(event);
737737
return;
738738
}
739739
if (!isLeftClick(event)) {
@@ -746,7 +746,7 @@ export class IgxGridCellComponent implements OnInit, OnChanges, OnDestroy {
746746
return;
747747
}
748748
this.selectionService.pointerDown(this.selectionNode, event.shiftKey, event.ctrlKey);
749-
this.activate(event, {rowIndex: this.rowIndex, colIndex: this.visibleColumnIndex});
749+
this.activate(event);
750750
}
751751

752752
/**
@@ -821,10 +821,9 @@ export class IgxGridCellComponent implements OnInit, OnChanges, OnDestroy {
821821
* @hidden
822822
* @internal
823823
*/
824-
public activate(event: FocusEvent | KeyboardEvent, position) {
824+
public activate(event: FocusEvent | KeyboardEvent) {
825825
const node = this.selectionNode;
826-
827-
this.grid.navigation.setActiveNode({ row: position.rowIndex, column: position.colIndex });
826+
this.grid.navigation.setActiveNode({ row: this.rowIndex, column: this.visibleColumnIndex });
828827

829828
const shouldEmitSelection = !this.selectionService.isActiveNode(node);
830829

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export class IgxGridNavigationService {
7070
if (NAVIGATION_KEYS.has(key)) {
7171
event.preventDefault();
7272
this.navigateInBody(position.rowIndex, position.colIndex, (obj) => {
73-
obj.target.activate(event, position);
73+
obj.target.activate(event);
7474
this.grid.cdr.detectChanges();
7575
});
7676
}
@@ -207,7 +207,7 @@ export class IgxGridNavigationService {
207207
if (!Object.keys(this.activeNode).length || this.activeNode.row < 0 || this.activeNode.row > gridRows - 1) {
208208
this.grid.navigateTo(0, 0, (obj) => {
209209
this.grid.clearCellSelection();
210-
obj.target.activate(event, {rowIndex: 0, colIndex: 0});
210+
obj.target.activate(event);
211211
});
212212
}
213213
}
@@ -301,7 +301,7 @@ export class IgxGridNavigationService {
301301
}
302302

303303
this.navigateInBody(next.rowIndex, next.visibleColumnIndex, (obj) => {
304-
obj.target.activate(event, { rowIndex: next.rowIndex, colIndex: next.visibleColumnIndex });
304+
obj.target.activate(event);
305305
this.grid.cdr.detectChanges();
306306
});
307307
}

projects/igniteui-angular/src/lib/grids/grid.rowEdit.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class IgxRowEditTabStopDirective {
6464
this.grid.navigation.activeNode.row = this.grid.rowInEditMode.index;
6565
this.grid.navigation.activeNode.column = this.currentCellIndex;
6666
this.grid.navigateTo(this.grid.rowInEditMode.index, this.currentCellIndex, (obj) => {
67-
obj.target.activate(event, {rowIndex: this.grid.rowInEditMode.index, colIndex: this.currentCellIndex});
67+
obj.target.activate(event);
6868
this.grid.cdr.detectChanges();
6969
});
7070
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ describe('IgxGrid - Column Moving #grid', () => {
631631

632632
// step 1 - select a cell from the 'ID' column
633633
const cell = grid.getCellByColumn(0, 'ID');
634-
cell.activate(null, {rowIndex: cell.rowIndex, colIndex: cell.columnIndex});
634+
cell.activate(null);
635635
fixture.detectChanges();
636636
expect(cell.selected).toBeTruthy();
637637

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ describe('IgxGrid - Keyboard navigation #grid', () => {
612612
GridFunctions.focusFirstCell(fix);
613613

614614
grid.navigateTo(15, 1, (args) => {
615-
args.target.activate(null, {rowIndex: 15, colIndex: 1});
615+
args.target.activate(null);
616616
});
617617
fix.detectChanges();
618618
await wait(200);
@@ -632,7 +632,7 @@ describe('IgxGrid - Keyboard navigation #grid', () => {
632632

633633
GridFunctions.focusFirstCell(fix);
634634

635-
grid.navigateTo(50, 50, (args) => { args.target.activate(null, {rowIndex: 50, colIndex: 50}); });
635+
grid.navigateTo(50, 50, (args) => { args.target.activate(null); });
636636
await wait(DEBOUNCETIME);
637637
fix.detectChanges();
638638
await wait(DEBOUNCETIME);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,6 @@ export class IgxHierarchicalGridCellComponent extends IgxGridCellComponent imple
7979
const parentRowID = parentGrid.hgridAPI.getParentRowId(childGrid);
8080
parentGrid.highlightedRowID = parentRowID;
8181
}
82-
super.activate(event, {rowIndex: this.selectionNode.row, colIndex: this.selectionNode.column});
82+
super.activate(event);
8383
}
8484
}

projects/igniteui-angular/src/lib/test-utils/grid-functions.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export class GridFunctions {
169169
public static focusCell(fix: ComponentFixture<any>, cell: IgxGridCellComponent) {
170170
this.getGridContent(fix).triggerEventHandler('focus', null);
171171
fix.detectChanges();
172-
cell.activate(null, {rowIndex: cell.rowIndex, colIndex: cell.columnIndex});
172+
cell.activate(null);
173173
fix.detectChanges();
174174
}
175175

0 commit comments

Comments
 (0)