Skip to content

Commit

Permalink
chore(*): fix lint errros
Browse files Browse the repository at this point in the history
  • Loading branch information
Volen99 committed Oct 1, 2021
1 parent aeebe04 commit 58aebb3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 30 deletions.
23 changes: 0 additions & 23 deletions projects/igniteui-angular/src/lib/grids/grid-base.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3708,22 +3708,6 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
.pipe(takeUntil(this.destroy$))
.subscribe((change: QueryList<IgxGridRowComponent>) => {
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(() => {
Expand Down Expand Up @@ -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;
}
Expand All @@ -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;
}

Expand Down Expand Up @@ -6430,9 +6410,6 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
if (diff) {
this.notifyChanges(true);
}

// debugger
// this.rowPinned.emit();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions src/app/grid-row-pinning/grid-row-pinning.sample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 58aebb3

Please sign in to comment.