@@ -30,28 +30,22 @@ const MINIMUM_COLUMN_WIDTH = 200;
30
30
providers : [ { provide : IgxRowDirective , useExisting : forwardRef ( ( ) => IgxPivotRowComponent ) } ]
31
31
} )
32
32
export class IgxPivotRowComponent extends IgxRowDirective {
33
-
34
- @Input ( )
35
- public pivotRowWidths : number ;
36
- public rowDimensionData : IPivotDimensionData [ ] = [ ] ;
37
-
38
- public get rowDimension ( ) {
39
- return this . rowDimensionData ?. map ( x => x . column ) ;
40
- }
41
-
42
33
/**
43
34
* @hidden
44
35
*/
45
36
@Input ( )
46
37
@HostBinding ( 'attr.aria-selected' )
47
38
public get selected ( ) : boolean {
48
39
let isSelected = false ;
49
- this . rowDimensionData . forEach ( x => {
50
- const key = this . getRowDimensionKey ( x . column as IgxColumnComponent ) ;
40
+ let prevDims = [ ] ;
41
+ for ( let rowDim of this . grid . rowDimensions ) {
42
+ const dimData = PivotUtil . getDimensionLevel ( rowDim , this . data , this . grid . pivotKeys ) ;
43
+ const key = PivotUtil . getRecordKey ( this . data , dimData . dimension , prevDims , this . grid . pivotKeys ) ;
51
44
if ( this . selectionService . isPivotRowSelected ( key ) ) {
52
45
isSelected = true ;
53
46
}
54
- } ) ;
47
+ prevDims . push ( dimData . dimension ) ;
48
+ }
55
49
return isSelected ;
56
50
}
57
51
@@ -73,16 +67,6 @@ export class IgxPivotRowComponent extends IgxRowDirective {
73
67
return this . index ;
74
68
}
75
69
76
- /**
77
- * @hidden
78
- * @internal
79
- */
80
- public getRowDimensionKey ( col : IgxColumnComponent ) {
81
- const dimData = this . rowDimensionData . find ( x => x . column . field === col . field ) ;
82
- const key = PivotUtil . getRecordKey ( this . data , dimData . dimension , dimData . prevDimensions , this . grid . pivotKeys ) ;
83
- return key ;
84
- }
85
-
86
70
public getCellClass ( col : IgxColumnComponent ) {
87
71
const configuration = this . grid . pivotConfiguration ;
88
72
if ( configuration . values . length === 1 ) {
0 commit comments