@@ -23,26 +23,30 @@ export class IgxPivotGridNavigationService extends IgxGridNavigationService {
23
23
}
24
24
event . preventDefault ( ) ;
25
25
26
- const newActiveNode = {
27
- row : this . activeNode . row , column : this . activeNode . column , level : null ,
28
- mchCache : null ,
29
- layout : null ,
30
- isRowDimensionHeader : this . activeNode . isRowDimensionHeader
31
- }
26
+ if ( this . activeNode . isRowDimensionHeader ) {
27
+ const newActiveNode = {
28
+ row : this . activeNode . row , column : this . activeNode . column , level : null ,
29
+ mchCache : null ,
30
+ layout : null ,
31
+ isRowDimensionHeader : this . activeNode . isRowDimensionHeader
32
+ }
32
33
33
- if ( ( key . includes ( 'left' ) || key === 'home' ) && this . activeNode . column > 0 ) {
34
- newActiveNode . column = ctrl || key === 'home' ? 0 : this . activeNode . column - 1 ;
35
- }
36
- if ( ( key . includes ( 'right' ) || key === 'end' ) && this . activeNode . column < this . lastRowDimensionsIndex ) {
37
- newActiveNode . column = ctrl || key === 'end' ? this . lastRowDimensionsIndex : this . activeNode . column + 1 ;
38
- }
39
- if ( ( key . includes ( 'up' ) ) && this . activeNode . row > 0 ) {
40
- newActiveNode . row = ctrl ? 0 : this . activeNode . row - 1 ;
41
- }
42
- if ( ( key . includes ( 'down' ) ) && this . activeNode . row < this . findLastDataRowIndex ( ) ) {
43
- newActiveNode . row = ctrl ? this . findLastDataRowIndex ( ) : this . activeNode . row + 1 ;
34
+ if ( ( key . includes ( 'left' ) || key === 'home' ) && this . activeNode . column > 0 ) {
35
+ newActiveNode . column = ctrl || key === 'home' ? 0 : this . activeNode . column - 1 ;
36
+ }
37
+ if ( ( key . includes ( 'right' ) || key === 'end' ) && this . activeNode . column < this . lastRowDimensionsIndex ) {
38
+ newActiveNode . column = ctrl || key === 'end' ? this . lastRowDimensionsIndex : this . activeNode . column + 1 ;
39
+ }
40
+ if ( ( key . includes ( 'up' ) ) && this . activeNode . row > 0 ) {
41
+ newActiveNode . row = ctrl ? 0 : this . activeNode . row - 1 ;
42
+ }
43
+ if ( ( key . includes ( 'down' ) ) && this . activeNode . row < this . findLastDataRowIndex ( ) ) {
44
+ newActiveNode . row = ctrl ? this . findLastDataRowIndex ( ) : this . activeNode . row + 1 ;
45
+ }
46
+ this . setActiveNode ( newActiveNode ) ;
47
+ this . grid . navigateTo ( newActiveNode . row ) ;
48
+ } else {
49
+ super . headerNavigation ( event ) ;
44
50
}
45
- this . setActiveNode ( newActiveNode ) ;
46
- this . grid . navigateTo ( newActiveNode . row ) ;
47
51
}
48
52
}
0 commit comments