@@ -51,13 +51,13 @@ export class IgxPivotHeaderRowComponent extends IgxGridHeaderRowComponent {
51
51
}
52
52
53
53
public rowRemoved ( event : IBaseChipEventArgs ) {
54
- const row = this . grid . pivotConfiguration . rows . find ( x => x . fieldName === event . owner . id ) ;
54
+ const row = this . grid . pivotConfiguration . rows . find ( x => x . memberName === event . owner . id ) ;
55
55
row . enabled = false ;
56
56
this . grid . pipeTrigger ++ ;
57
57
}
58
58
59
59
public columnRemoved ( event : IBaseChipEventArgs ) {
60
- const col = this . grid . pivotConfiguration . columns . find ( x => x . fieldName === event . owner . id ) ;
60
+ const col = this . grid . pivotConfiguration . columns . find ( x => x . memberName === event . owner . id ) ;
61
61
col . enabled = false ;
62
62
this . grid . setupColumns ( ) ;
63
63
this . grid . pipeTrigger ++ ;
@@ -71,7 +71,7 @@ export class IgxPivotHeaderRowComponent extends IgxGridHeaderRowComponent {
71
71
}
72
72
73
73
public filterRemoved ( event : IBaseChipEventArgs ) {
74
- const filter = this . grid . pivotConfiguration . filters . find ( x => x . fieldName === event . owner . id ) ;
74
+ const filter = this . grid . pivotConfiguration . filters . find ( x => x . memberName === event . owner . id ) ;
75
75
filter . enabled = false ;
76
76
}
77
77
@@ -157,15 +157,15 @@ export class IgxPivotHeaderRowComponent extends IgxGridHeaderRowComponent {
157
157
const chip = chipsArray . find ( x => x . id === dragId ) ;
158
158
const isNewChip = chip === undefined ;
159
159
//const chipIndex = chipsArray.indexOf(event.owner) !== -1 ? chipsArray.indexOf(event.owner) : chipsArray.length;
160
- const chipIndex = currentDim . findIndex ( x => x . fieldName === event . owner . id ) !== - 1 ?
161
- currentDim . findIndex ( x => x . fieldName === event . owner . id ) : currentDim . length ;
160
+ const chipIndex = currentDim . findIndex ( x => x . memberName === event . owner . id ) !== - 1 ?
161
+ currentDim . findIndex ( x => x . memberName === event . owner . id ) : currentDim . length ;
162
162
const targetIndex = this . _dropPos === DropPosition . AfterDropTarget ? chipIndex + 1 : chipIndex ;
163
163
if ( isNewChip ) {
164
164
const allDims = this . grid . pivotConfiguration . rows
165
165
. concat ( this . grid . pivotConfiguration . columns )
166
166
. concat ( this . grid . pivotConfiguration . filters ) ;
167
167
// chip moved from external collection
168
- const dims = allDims . filter ( x => x && x . fieldName === dragId ) ;
168
+ const dims = allDims . filter ( x => x && x . memberName === dragId ) ;
169
169
if ( dims . length === 0 ) {
170
170
// you have dragged something that is not a dimension
171
171
return ;
@@ -174,7 +174,7 @@ export class IgxPivotHeaderRowComponent extends IgxGridHeaderRowComponent {
174
174
element . enabled = false ;
175
175
} ) ;
176
176
177
- const currentDimChild = currentDim . find ( x => x && x . fieldName === dragId ) ;
177
+ const currentDimChild = currentDim . find ( x => x && x . memberName === dragId ) ;
178
178
if ( currentDimChild ) {
179
179
currentDimChild . enabled = true ;
180
180
const dragChipIndex = currentDim . indexOf ( currentDimChild ) ;
@@ -185,16 +185,16 @@ export class IgxPivotHeaderRowComponent extends IgxGridHeaderRowComponent {
185
185
newDim . enabled = true ;
186
186
currentDim . splice ( chipIndex , 0 , newDim ) ;
187
187
}
188
- const isDraggedFromColumn = ! ! this . grid . pivotConfiguration . columns ?. find ( x => x && x . fieldName === dragId ) ;
188
+ const isDraggedFromColumn = ! ! this . grid . pivotConfiguration . columns ?. find ( x => x && x . memberName === dragId ) ;
189
189
if ( isDraggedFromColumn ) {
190
190
// columns have changed.
191
191
this . grid . setupColumns ( ) ;
192
192
}
193
193
} else {
194
194
// chip from same collection, reordered.
195
- const newDim = currentDim . find ( x => x . fieldName === dragId ) ;
195
+ const newDim = currentDim . find ( x => x . memberName === dragId ) ;
196
196
//const dragChipIndex = chipsArray.indexOf(event.dragChip || event.dragData.chip);
197
- const dragChipIndex = currentDim . findIndex ( x => x . fieldName === dragId ) ;
197
+ const dragChipIndex = currentDim . findIndex ( x => x . memberName === dragId ) ;
198
198
currentDim . splice ( dragChipIndex , 1 ) ;
199
199
currentDim . splice ( dragChipIndex > chipIndex ? targetIndex : targetIndex - 1 , 0 , newDim ) ;
200
200
}
0 commit comments