Skip to content

Commit

Permalink
AG-11314 - Fix pagination reactivity
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewGlazier committed May 15, 2024
1 parent a96092e commit 2bd7176
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions community-modules/core/src/pagination/paginationProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ export class PaginationProxy extends BeanStub {
this.eventService.dispatchEvent(paginationChangedEvent);
}

public setPageSize(size: number, source: 'autoCalculated' | 'pageSizeSelector' | 'initialState' | 'gridOptions'): void {
public setPageSize(size: number | undefined, source: 'autoCalculated' | 'pageSizeSelector' | 'initialState' | 'gridOptions'): void {
const currentSize = this.pageSize;
switch (source) {
case 'autoCalculated':
Expand Down Expand Up @@ -431,7 +431,9 @@ export class PaginationProxy extends BeanStub {
}

private calculatedPagesNotActive(): void {
this.setPageSize(this.masterRowCount, 'autoCalculated');
// when pagination is not active we don't use any page size variables,
// however need to unset this so if enabled we recalculate.
this.setPageSize(undefined, 'autoCalculated');
this.totalPages = 1;
this.currentPage = 0;
this.topDisplayedRowIndex = 0;
Expand Down

0 comments on commit 2bd7176

Please sign in to comment.