Skip to content

Commit 367160f

Browse files
crisbetotinayuangao
authored andcommitted
chore(paginator): coerce hidePageSize value (#9629)
Coerces the `hidePageSize` input for consistency with other boolean inputs. Fixes #9625.
1 parent 04cdb13 commit 367160f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/lib/paginator/paginator.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,13 @@ export class MatPaginator implements OnInit, OnDestroy {
9898
private _pageSizeOptions: number[] = [];
9999

100100
/** Whether to hide the page size selection UI from the user. */
101-
@Input() hidePageSize = false;
101+
@Input()
102+
get hidePageSize(): boolean { return this._hidePageSize; }
103+
set hidePageSize(value: boolean) {
104+
this._hidePageSize = coerceBooleanProperty(value);
105+
}
106+
private _hidePageSize = false;
107+
102108

103109
/** Whether to show the first/last buttons UI to the user. */
104110
@Input()

0 commit comments

Comments
 (0)