gregnb / gregnb/mui-datatables
Uncaught TypeError: onPageChange is not a function
- Dominant language
- JavaScript
- Stars
- 2.7k
- Forks
- 906
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
In my table when I switch pages and rows it doesn't work
At the moment of rendering the content of the table is present, even the functions are all functional, outside the page switch and the selection of the rows to be displayed.
console error{
`Warning: Failed prop type: The prop onPageChange is marked as required in ForwardRef(TablePagination), but its value is undefined`
}
console error{
`Warning: Unknown event handler property onChangePage. It will be ignored.`
}
console error{
`index.js:1 Warning: Unknown event handler property onChangeRowsPerPage. It will be ignored.`
}
at each click of the icon to change the page or select the lines to be displayed, the following error is printed in the console
Uncaught TypeError: onPageChange is not a function.
_________________________________________________________________________________
here is my code..
const columns = [
{
name: "id",
label: "ID",
},
{
name: "createdAt",
label: "Data",
options: {
filter: true,
sort: true,
}
},
{
name: "dest_nominativo",
label: "Destinatario",
options: {
filter: true,
sort: true,
}
},
];
const options = {
filter: true,
filterType: "dropdown",
customToolbarSelect: (data, item) => {
return (
{
calcoloArrayID(data)
}}>
Convalida
)
},
onChangeRowsPerPage: (data) => {
},
onRowSelectionChange: (data) => {
},
onRowClick: (data) => {
history.push({ pathname: '/customer/dashboard/spedizione', state: { code: 1, id: data[0] } });
}
};
-->
|--------------|---------|
| Material-UI |
| MUI-datatables | 3.7.7 |
| React | js |
| browser | chrome/safari |
| etc | |
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.