Skip to content

Commit c10ab81

Browse files
MKirovaMayaKirova
authored andcommitted
fix(igxGrid): Remove unnecessary code since correct page is already calculated and set correctly in the Grid Paging pipe.
1 parent 3b927e1 commit c10ab81

File tree

3 files changed

+1
-11
lines changed

3 files changed

+1
-11
lines changed

projects/igniteui-angular/src/lib/grids/api.service.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -540,10 +540,6 @@ export class GridBaseAPIService <T extends IgxGridBaseDirective & GridType> {
540540
return false;
541541
}
542542

543-
public atInexistingPage(): boolean {
544-
return this.grid.totalPages - 1 > this.grid.page;
545-
}
546-
547543
public get_row_expansion_state(record: any): boolean {
548544
const grid = this.grid;
549545
const states = grid.expansionStates;

projects/igniteui-angular/src/lib/grids/grid-base.directive.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2640,12 +2640,6 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
26402640
this.summaryService.clearSummaryCache();
26412641
this._pipeTrigger++;
26422642
this.notifyChanges();
2643-
if (this.transactions.getAggregatedChanges(false).length === 0) {
2644-
// Needs better check, calling 'transactions.clear()' will also trigger this
2645-
if (this.gridAPI.atInexistingPage()) {
2646-
this.page--;
2647-
}
2648-
}
26492643
});
26502644

26512645
this.resizeNotify.pipe(destructor, filter(() => !this._init), throttleTime(100))

src/app/grid-row-edit/grid-row-edit-sample.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ <h4>Cancel Grid Edit Events</h4>
9191
</div>
9292
<app-grid-with-transactions>
9393
<igx-grid #gridRowEditTransaction [data]="data" [primaryKey]="'ProductID'" width="900px" height="700px"
94-
[rowEditable]="true" [paging]="true" [perPage]="10" (onRowEdit)="rowEditDone($event)"
94+
[rowEditable]="true" [paging]="true" [perPage]="5" (onRowEdit)="rowEditDone($event)"
9595
(onRowEditCancel)="rowEditCancel($event)" (onRowEditEnter)="rowEditEnter($event)"
9696
(onCellEditEnter)="cellEnterEditMode($event)" (onCellEdit)="cellEditDone($event)"
9797
(onCellEditCancel)="cellEditCancel($event)">

0 commit comments

Comments
 (0)