Skip to content

[Table] Rename onChangeRowsPerPage, onChangePage#22900

Merged
eps1lon merged 3 commits intomui:nextfrom
eladmotola:feat/table-api-changes
Oct 7, 2020
Merged

[Table] Rename onChangeRowsPerPage, onChangePage#22900
eps1lon merged 3 commits intomui:nextfrom
eladmotola:feat/table-api-changes

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 Introduces changes that are not backward compatible. scope: table Changes related to the table. type: new feature Expand the scope of the product to solve a new problem. labels Oct 6, 2020
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 Introduces changes that are not backward compatible. scope: table Changes related to the table. type: new feature Expand the scope of the product to solve a new problem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants