Skip to content

Commit 2d50f68

Browse files
authored
Merge pull request #14412 from IgniteUI/iminchev/fix-row-dimension-nav
fix(pivotGrid): row dimension kb nav
2 parents 1a005d1 + 9091492 commit 2d50f68

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

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

+13-9
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,19 @@ export class IgxPivotGridNavigationService extends IgxGridNavigationService {
8383
}
8484

8585
verticalContainer = this.grid.verticalRowDimScrollContainers.toArray()[newActiveNode.column];
86-
if (key.includes('up') && this.activeNode.row > 0) {
87-
newActiveNode.row = ctrl ? 0 : this.activeNode.row - 1;
88-
} else if (key.includes('up')) {
89-
newActiveNode.row = 0;
90-
newActiveNode.column = newActiveNode.layout.colStart - 1;
91-
newActiveNode.layout = null;
92-
this.isRowDimensionHeaderActive = true;
93-
this.isRowHeaderActive = false;
94-
this.grid.theadRow.nativeElement.focus();
86+
if (key.includes('up')) {
87+
if (ctrl) {
88+
newActiveNode.row = 0;
89+
} else if (this.activeNode.row > 0) {
90+
newActiveNode.row = this.activeNode.row - 1;
91+
} else {
92+
newActiveNode.row = -1;
93+
newActiveNode.column = newActiveNode.layout ? newActiveNode.layout.colStart - 1 : 0;
94+
newActiveNode.layout = null;
95+
this.isRowDimensionHeaderActive = true;
96+
this.isRowHeaderActive = false;
97+
this.grid.theadRow.nativeElement.focus();
98+
}
9599
}
96100

97101
if (key.includes('down') && this.activeNode.row < this.findLastDataRowIndex()) {

0 commit comments

Comments
 (0)