question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error with Pagination props

See original GitHub issue

What you were expecting:

I need to create a custom list component using hooks to deal with requests. So, I don’t want to use the <List> component. I saw in the documentation that it is possible to use <Datagrid> With A Custom Query. The doc can be read here As you can see in the doc, we can use the <Pagination> component after <Datagrid> passing these props: image

So, I have been expecting to use that without error.

What happened instead:

However, when I use these props in <Pagination> with Typescript, I have an error, because <Pagination> just receives these props: image

The error is: image

Steps to reproduce:

You can see the error here: https://codesandbox.io/s/heuristic-ganguly-jhsu68?file=/src/posts/PostList.tsx

image

Related code:

  • React-admin version: 3.19.10
  • React version: 17.0.2
  • Browser: All

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
tassioFrontcommented, Jul 8, 2022

Same happing with me.

2reactions
fzaninottocommented, Jul 8, 2022

Reproduced on 4.x, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error pagination · Issue #2943 · mbrn/material-table - GitHub
Just loading the component already show 3 errors: Warning: Failed prop type: The prop onChangePage of ForwardRef(TablePagination) is deprecated.
Read more >
TypeError: props.pagination is undefined - Stack Overflow
Issue : As per your console log you are getting selectPage undefined initially, and you also setting up the value only on mount....
Read more >
react-select-async-paginate - npm
Start using react-select-async-paginate in your project by running ... default react-select thus it accepts all props of default Select .
Read more >
Unexpected mutation of Prop - Laracasts
Please help, I get: error Unexpected mutation of "pagination" prop vue/no-mutating-props. I am following a similar style to what is done here: ...
Read more >
Pagination Props · react-bootstrap-table2 - GitHub Pages
Use pagination.page specify the current page when table render. It's necessary value when remote pagination is enabled. pagination.sizePerPage ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found