Skip to content

Commit 18010d9

Browse files
committed
chore(*): address review comment
1 parent 5fc0b82 commit 18010d9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ import { IgxGridHeaderRowComponent } from './headers/grid-header-row.component';
156156
import { IgxGridGroupByAreaComponent } from './grouping/grid-group-by-area.component';
157157

158158
let FAKE_ROW_ID = -1;
159-
159+
const DEFAULT_ITEMS_PER_PAGE = 15;
160160
const MINIMUM_COLUMN_WIDTH = 136;
161161
const FILTER_ROW_HEIGHT = 50;
162162
// By default row editing overlay outlet is inside grid body so that overlay is hidden below grid header when scrolling.
@@ -1477,7 +1477,7 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
14771477
@DeprecateProperty('`perPage` is deprecated. Use `perPage` property from `paginator` component instead.')
14781478
@Input()
14791479
public get perPage(): number {
1480-
return this.paginator?.perPage || 15;
1480+
return this.paginator?.perPage || DEFAULT_ITEMS_PER_PAGE;
14811481
}
14821482

14831483
public set perPage(val: number) {
@@ -2739,7 +2739,7 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
27392739
/**
27402740
* @hidden
27412741
*/
2742-
protected _perPage = 15;
2742+
protected _perPage = DEFAULT_ITEMS_PER_PAGE;
27432743
/**
27442744
* @hidden
27452745
*/
@@ -3627,7 +3627,7 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
36273627
// Keep the stream open for future subscribers
36283628
this.rendered$.pipe(takeUntil(this.destroy$)).subscribe(() => {
36293629
if (this.paginator) {
3630-
this.paginator.perPage = this._perPage !== 15 ? this._perPage : this.paginator.perPage;
3630+
this.paginator.perPage = this._perPage !== DEFAULT_ITEMS_PER_PAGE ? this._perPage : this.paginator.perPage;
36313631
this.paginator.totalRecords = this.totalRecords;
36323632
this.paginator.overlaySettings = { outlet: this.outlet };
36333633
}

0 commit comments

Comments
 (0)