-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
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
[DataGrid] Allow passing readonly arrays to pageSizeOptions
prop
#11609
Conversation
Deploy preview: https://deploy-preview-11609--material-ui-x.netlify.app/ |
Will require mui/material-ui#40481 first |
Just in case, |
ef4927f
to
4f3d499
Compare
Thanks for the heads' up. I've added a cast and left some documentation around it. |
@@ -304,7 +304,7 @@ export interface DataGridPropsWithDefaultValues { | |||
* Select the pageSize dynamically using the component UI. | |||
* @default [25, 50, 100] | |||
*/ | |||
pageSizeOptions: Array<number | { value: number; label: string }>; | |||
pageSizeOptions: readonly (number | { value: number; label: string })[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More consistent in the codebase? We are using ReadonlyArray over readonly in mui/material-ui#40481 and mui/material-ui#40754
pageSizeOptions: readonly (number | { value: number; label: string })[]; | |
pageSizeOptions: ReadonlyArray<number | { value: number; label: string }>; |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
db28846
to
b5169dd
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
1 similar comment
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
pageSizeOptions
proppageSizeOptions
prop
b5169dd
to
b5a413a
Compare
pageSizeOptions
proppageSizeOptions
prop
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
…11609) Co-authored-by: Andrew Cherniavskyi <andrew@mui.com>
…ui#11609) Co-authored-by: Andrew Cherniavskyi <andrew@mui.com>
Contributes to #10685