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

Error with Pagination props #7955

Closed
rafaelgslima opened this issue Jul 8, 2022 · 5 comments · Fixed by #7956
Closed

Error with Pagination props #7955

rafaelgslima opened this issue Jul 8, 2022 · 5 comments · Fixed by #7956
Assignees
Labels

Comments

@rafaelgslima
Copy link

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
@tassioFront
Copy link

Same happing with me.

@fzaninotto
Copy link
Member

Reproduced on 4.x, thanks!

@schirrel
Copy link

schirrel commented Jul 8, 2022

@fzaninotto i am having this problem at version 3.19, could you fix for that version also?

@fzaninotto
Copy link
Member

@schirrel not in the near future, but you're welcome to take inspiration from #7956 and submit a PR against the 3.x branch!

@schirrel
Copy link

schirrel commented Jul 8, 2022

sure @fzaninotto, i gonna work on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants