diff --git a/projects/igniteui-angular/src/lib/grids/grid-base.directive.ts b/projects/igniteui-angular/src/lib/grids/grid-base.directive.ts index fbe4a5e285a..23de0f8fcb7 100644 --- a/projects/igniteui-angular/src/lib/grids/grid-base.directive.ts +++ b/projects/igniteui-angular/src/lib/grids/grid-base.directive.ts @@ -3708,22 +3708,6 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements .pipe(takeUntil(this.destroy$)) .subscribe((change: QueryList) => { this.onPinnedRowsChanged(change); - - /* debugger - if (change.last && change.last.pinned) { - const row = new IgxGridRow(change.last.grid, change.last.index, change.last.rowData); - const eventArgs: IPinRowEventArgs = { - insertAtIndex: change.last.index, - isPinned: true, - rowID: change.last.rowID, - row: row - }; - - //this.gridAPI.get_row_by_key(changel.last.index) - - this.rowPinned.emit(eventArgs); - }*/ - }); this.addRowSnackbar?.clicked.subscribe(() => { @@ -4807,7 +4791,6 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements * @param index The index at which to insert the row in the pinned collection. */ public pinRow(rowID: any, index?: number, row?: RowType): boolean { - debugger if (this._pinnedRecordIDs.indexOf(rowID) !== -1) { return false; } @@ -4827,13 +4810,10 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements this.pipeTrigger++; if (this.gridAPI.grid) { this.notifyChanges(); - // Force pipe triggering this.cdr.detectChanges(); this.rowPinned.emit(eventArgs) } - - return true; } @@ -6430,9 +6410,6 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements if (diff) { this.notifyChanges(true); } - - // debugger - // this.rowPinned.emit(); } /** diff --git a/projects/igniteui-angular/src/lib/grids/grid/grid-row-pinning.spec.ts b/projects/igniteui-angular/src/lib/grids/grid/grid-row-pinning.spec.ts index 3f7be573f15..440395f7194 100644 --- a/projects/igniteui-angular/src/lib/grids/grid/grid-row-pinning.spec.ts +++ b/projects/igniteui-angular/src/lib/grids/grid/grid-row-pinning.spec.ts @@ -461,13 +461,13 @@ describe('Row Pinning #grid', () => { fix.detectChanges(); expect(grid.gridAPI.get_row_by_index(0).rowID).toBe(fix.componentInstance.data[1]); - expect(grid.gridAPI.get_row_by_index(1).rowID).toBe(fix.componentInstance.data[4]); + expect(grid.gridAPI.get_row_by_index(1).rowID).toBe(fix.componentInstance.data[5]); grid.sort({ fieldName: 'ID', dir: SortingDirection.Desc, ignoreCase: false }); fix.detectChanges(); // check pinned rows data is sorted - expect(grid.gridAPI.get_row_by_index(0).rowID).toBe(fix.componentInstance.data[4]); + expect(grid.gridAPI.get_row_by_index(0).rowID).toBe(fix.componentInstance.data[5]); expect(grid.gridAPI.get_row_by_index(1).rowID).toBe(fix.componentInstance.data[1]); // check unpinned rows data is sorted diff --git a/src/app/grid-row-pinning/grid-row-pinning.sample.ts b/src/app/grid-row-pinning/grid-row-pinning.sample.ts index e774c13104f..fbdcd88c940 100644 --- a/src/app/grid-row-pinning/grid-row-pinning.sample.ts +++ b/src/app/grid-row-pinning/grid-row-pinning.sample.ts @@ -179,11 +179,6 @@ export class GridRowPinningSampleComponent implements OnInit, AfterViewInit { ]; this.selectionMode = GridSelectionMode.multiple; /* eslint-enable max-len */ - - this.grid1.rowPinned.subscribe((event) => { - debugger - const row = this.state.getState(true, ['rowPinning']); // return value doesn't include the pinned row - }); } public ngAfterViewInit() {