@@ -51,13 +51,13 @@ export class IgxPivotHeaderRowComponent extends IgxGridHeaderRowComponent {
5151 }
5252
5353 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 ) ;
5555 row . enabled = false ;
5656 this . grid . pipeTrigger ++ ;
5757 }
5858
5959 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 ) ;
6161 col . enabled = false ;
6262 this . grid . setupColumns ( ) ;
6363 this . grid . pipeTrigger ++ ;
@@ -71,7 +71,7 @@ export class IgxPivotHeaderRowComponent extends IgxGridHeaderRowComponent {
7171 }
7272
7373 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 ) ;
7575 filter . enabled = false ;
7676 }
7777
@@ -157,15 +157,15 @@ export class IgxPivotHeaderRowComponent extends IgxGridHeaderRowComponent {
157157 const chip = chipsArray . find ( x => x . id === dragId ) ;
158158 const isNewChip = chip === undefined ;
159159 //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 ;
162162 const targetIndex = this . _dropPos === DropPosition . AfterDropTarget ? chipIndex + 1 : chipIndex ;
163163 if ( isNewChip ) {
164164 const allDims = this . grid . pivotConfiguration . rows
165165 . concat ( this . grid . pivotConfiguration . columns )
166166 . concat ( this . grid . pivotConfiguration . filters ) ;
167167 // 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 ) ;
169169 if ( dims . length === 0 ) {
170170 // you have dragged something that is not a dimension
171171 return ;
@@ -174,7 +174,7 @@ export class IgxPivotHeaderRowComponent extends IgxGridHeaderRowComponent {
174174 element . enabled = false ;
175175 } ) ;
176176
177- const currentDimChild = currentDim . find ( x => x && x . fieldName === dragId ) ;
177+ const currentDimChild = currentDim . find ( x => x && x . memberName === dragId ) ;
178178 if ( currentDimChild ) {
179179 currentDimChild . enabled = true ;
180180 const dragChipIndex = currentDim . indexOf ( currentDimChild ) ;
@@ -185,16 +185,16 @@ export class IgxPivotHeaderRowComponent extends IgxGridHeaderRowComponent {
185185 newDim . enabled = true ;
186186 currentDim . splice ( chipIndex , 0 , newDim ) ;
187187 }
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 ) ;
189189 if ( isDraggedFromColumn ) {
190190 // columns have changed.
191191 this . grid . setupColumns ( ) ;
192192 }
193193 } else {
194194 // chip from same collection, reordered.
195- const newDim = currentDim . find ( x => x . fieldName === dragId ) ;
195+ const newDim = currentDim . find ( x => x . memberName === dragId ) ;
196196 //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 ) ;
198198 currentDim . splice ( dragChipIndex , 1 ) ;
199199 currentDim . splice ( dragChipIndex > chipIndex ? targetIndex : targetIndex - 1 , 0 , newDim ) ;
200200 }
0 commit comments