Skip to content
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

[material-ui][base-ui][TablePagination] Accept readonly array for rowsPerPageOptions prop #40481

Merged
merged 3 commits into from
Jan 20, 2024

Conversation

pcorpet
Copy link
Contributor

@pcorpet pcorpet commented Jan 8, 2024

@mui-bot
Copy link

mui-bot commented Jan 8, 2024

Netlify deploy preview

https://deploy-preview-40481--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 69cc5eb

@zannager zannager added component: data grid This is the name of the generic UI component, not the React module! typescript labels Jan 8, 2024
@oliviertassinari oliviertassinari added component: table This is the name of the generic UI component, not the React module! and removed component: data grid This is the name of the generic UI component, not the React module! labels Jan 8, 2024
@oliviertassinari oliviertassinari changed the title [types] Accept readonly array for rowsPerPageOptions prop [Table] Accept readonly array for rowsPerPageOptions prop Jan 8, 2024
@oliviertassinari oliviertassinari added the bug 🐛 Something doesn't work label Jan 8, 2024
@oliviertassinari
Copy link
Member

oliviertassinari commented Jan 8, 2024

The direction looks good, same as #25155. I don't know if we need a test case for this.

It even looks like we should do this change everywhere in the codebase while we are at it. For example:

@pcorpet
Copy link
Contributor Author

pcorpet commented Jan 8, 2024

I'm just a humble user of MUI and didn't want to move too many things at once. Do you want me to do that in that PR as well?

@oliviertassinari
Copy link
Member

oliviertassinari commented Jan 8, 2024

@pcorpet I'm not responsible for reviewing PRs anymore. I landed here from @zannager. My comment was more to raise to maintainers the value of carrying the idea behind this PR in the whole codebase (#25155 was already a sign). There don't seem to be downsides, only DX upsides:


@oliviertassinari
Copy link
Member

rowsPerPageOptions is defined 3 times, for 3 different components, I think we should update all.

@ZeeshanTamboli ZeeshanTamboli changed the title [Table] Accept readonly array for rowsPerPageOptions prop [TablePagination] Accept readonly array for rowsPerPageOptions prop Jan 20, 2024
@ZeeshanTamboli ZeeshanTamboli added package: material-ui Specific to @mui/material package: base-ui Specific to @mui/base labels Jan 20, 2024
Copy link
Member

@ZeeshanTamboli ZeeshanTamboli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good. I've updated the prop in Material UI Table Pagination. I believe no tests are necessary for this. We can address the other mentioned props here in separate PRs. Thanks, @pcorpet!

@ZeeshanTamboli ZeeshanTamboli changed the title [TablePagination] Accept readonly array for rowsPerPageOptions prop [material-ui][base-ui][TablePagination] Accept readonly array for rowsPerPageOptions prop Jan 20, 2024
@ZeeshanTamboli ZeeshanTamboli merged commit e6ed918 into mui:master Jan 20, 2024
21 checks passed
@pcorpet pcorpet deleted the readonly-rows-per-page branch January 20, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: table This is the name of the generic UI component, not the React module! package: base-ui Specific to @mui/base package: material-ui Specific to @mui/material typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants