We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No response
MatPaginator requires pageSizeOptions to be a mutable array. Passing in a ReadonlyArray fails.
pageSizeOptions
Steps to reproduce:
@Component({ selector: 'example-component', template: '<mat-paginator [pageSizeOptions]="pageSizeOptions"></mat-paginator>', }) export class ExampleComponent { pageSizeOptions: ReadonlyArray<number> = [10, 20]; }
https://stackblitz.com/edit/components-issue-rvmtli?file=src/app/example-component.ts
I am unaware that MatPaginator would mutate the passed in Array. Passing in a ReadonlyArray should work.
Throws
The type 'readonly number[]' is 'readonly' and cannot be assigned to the mutable type 'number[]'.
The text was updated successfully, but these errors were encountered:
fix(material/paginator): allow readonly options
9e0a2ad
closes angular#24050
d1a2769
fix(material/paginator): allow readonly options (#24054)
a4f6558
closes #24050 (cherry picked from commit 772176a)
772176a
closes #24050
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
Sorry, something went wrong.
fix(material/paginator): allow readonly options (angular#24054)
7debdfe
Successfully merging a pull request may close this issue.
Is this a regression?
The previous version in which this bug was not present was
No response
Description
MatPaginator requires
pageSizeOptions
to be a mutable array. Passing in a ReadonlyArray fails.Reproduction
Steps to reproduce:
https://stackblitz.com/edit/components-issue-rvmtli?file=src/app/example-component.ts
Expected Behavior
I am unaware that MatPaginator would mutate the passed in Array. Passing in a ReadonlyArray should work.
Actual Behavior
Throws
Environment
The text was updated successfully, but these errors were encountered: