mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(paginator): remove extra exposed properties (#14809)
Makes the `_pageIndex` and `_length` properties private so they don't pollute the public API and because they already have public getters.
This commit is contained in:
committed by
Jeremy Elbourn
parent
3ddcd8df29
commit
2da7c11e22
@@ -93,7 +93,7 @@ export class MatPaginator extends _MatPaginatorBase implements OnInit, OnDestroy
|
||||
this._pageIndex = Math.max(coerceNumberProperty(value), 0);
|
||||
this._changeDetectorRef.markForCheck();
|
||||
}
|
||||
_pageIndex: number = 0;
|
||||
private _pageIndex = 0;
|
||||
|
||||
/** The length of the total number of items that are being paginated. Defaulted to 0. */
|
||||
@Input()
|
||||
@@ -102,7 +102,7 @@ export class MatPaginator extends _MatPaginatorBase implements OnInit, OnDestroy
|
||||
this._length = coerceNumberProperty(value);
|
||||
this._changeDetectorRef.markForCheck();
|
||||
}
|
||||
_length: number = 0;
|
||||
private _length = 0;
|
||||
|
||||
/** Number of items to display on a page. By default set to 50. */
|
||||
@Input()
|
||||
|
||||
-2
@@ -11,8 +11,6 @@ export declare function MAT_PAGINATOR_INTL_PROVIDER_FACTORY(parentIntl: MatPagin
|
||||
export declare class MatPaginator extends _MatPaginatorBase implements OnInit, OnDestroy, CanDisable, HasInitialized {
|
||||
_displayedPageSizeOptions: number[];
|
||||
_intl: MatPaginatorIntl;
|
||||
_length: number;
|
||||
_pageIndex: number;
|
||||
color: ThemePalette;
|
||||
hidePageSize: boolean;
|
||||
length: number;
|
||||
|
||||
Reference in New Issue
Block a user