Skip to content

Commit e20a9ed

Browse files
authored
Merge pull request #7547 from IgniteUI/mkirova/fix-6654-9.0.x
fix(igxGrid): Remove unnecessary code since correct page is already c…
2 parents 6c382a4 + c3bb9c3 commit e20a9ed

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
@@ -2639,12 +2639,6 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
26392639
this.summaryService.clearSummaryCache();
26402640
this._pipeTrigger++;
26412641
this.notifyChanges();
2642-
if (this.transactions.getAggregatedChanges(false).length === 0) {
2643-
// Needs better check, calling 'transactions.clear()' will also trigger this
2644-
if (this.gridAPI.atInexistingPage()) {
2645-
this.page--;
2646-
}
2647-
}
26482642
});
26492643

26502644
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)