I have upgraded from Material-UI v4 to v5 and am now getting the following error:
TypeError: onChangePage is not a function
function handleNextButtonClick(row) {
> onChangePage(row, page + 1);
}
It appears that the onChangePage prop is now undefined within the TablePaginationActions component.
In Material-UI v5 the prop name has changed from onChangePage to onPageChange.
I simply had to change the property name in the TablePagination component, as well as in all places where this prop is used within the TablePaginationActions component.
To simplify migration to v5 I recommend to go through all breaking changes on this official page
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With