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

[Table] Rename onChangeRowsPerPage, onChangePage #22900

Merged
merged 3 commits into from
Oct 7, 2020

Conversation

eladmotola
Copy link
Contributor

@eladmotola eladmotola commented Oct 5, 2020

Breaking changes

  • [Table] Rename onChangeRowsPerPage to onRowsPerPageChange and onChangePage to onPageChange due to API consistency.

    <TablePagination
    - onChangeRowsPerPage={()=>{}}
    - onChangePage={()=>{}}
    + onRowsPerPageChange={()=>{}}
    + onPageChange={()=>{}}

Part of #20012

@mui-pr-bot
Copy link

mui-pr-bot commented Oct 5, 2020

Details of bundle changes

Generated by 🚫 dangerJS against b344c04

@eps1lon eps1lon added breaking change component: table This is the name of the generic UI component, not the React module! new feature New feature or request labels Oct 6, 2020
docs/src/pages/guides/api/api.md Outdated Show resolved Hide resolved
Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
@eps1lon eps1lon merged commit ab33be8 into mui:next Oct 7, 2020
@eps1lon
Copy link
Member

eps1lon commented Oct 7, 2020

@eladmotola Thanks!

@stevemk14ebr
Copy link

stevemk14ebr commented Nov 10, 2020

Hi, this change broke some stuff. The documentation here is not valid now: https://material-ui.com/api/table-pagination/ and when this prop is not provided the pagination throws an error as these events are undefined. Combined with the documentation being incorrect this makes the simple act of upgrading to the latest material-ui version cause an error: with is not a function throwing internally in the material-ui source.

@eps1lon
Copy link
Member

eps1lon commented Nov 10, 2020

material-ui.com/api/table-pagination

That is the documentation for the latest stable release i.e. v4. This PR targetted v5 for which the documentation can be found at https://next.material-ui.com/api/table-pagination

@mbrookes
Copy link
Member

Hey @eladmotola! 👋 Do you think you might be able to add a deprecation warning for this on the master branch?

You can probably find a suitable example to follow in #20012 Deprecations section – PR # prefixed with "Dep:".

Thanks!

@eladmotola
Copy link
Contributor Author

Hey @mbrookes !
I'm sorry but I'm busy at the moment so I dont think I will have the time to get to it.

@mbrookes
Copy link
Member

No worries, and thanks for your contribution so far! 🙏 We'll try to pick this up before v5, but if you get a chance in the meantime, feel free to jump in. (Would hate to have to revert this! 😅)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change component: table This is the name of the generic UI component, not the React module! new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants