-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Partial Pagination Not Working for ReferenceManyField
#8014
Comments
Thanks for this helpful and almost perfect reporting! Could you provide a behaviour reproduction sandbox?
Many thanks for your help in this matter! 👍 |
Thank you @septentrion-730n! I will do this soon. |
Hi @septentrion-730n, here is the reproduction sandbox: https://codesandbox.io/s/sad-murdock-lgb5ck The changes I made are as follows:
Notice how the pagination does not render at the following path: However, when commenting out the fourth change, pagination works because the default implementation of |
Reproduced, thanks! |
For those who encounter this issue in the future, a workaround is to return As an example:
This works because the For those who use TypeScript, you can use the |
What you were expecting:
When the
getManyReference
method of thedataProvider
returnspageInfo
instead oftotal
, partial pagination should be in effect for the pagination component passed to theReferenceManyField
component.What happened instead:
When the
getManyReference
method of thedataProvider
returnspageInfo
instead oftotal
, the pagination component passed to theReferenceManyField
component does not render at all.Steps to reproduce:
Pagination
component to theReferenceManyField
:https://marmelab.com/react-admin/ReferenceManyField.html#pagination
getManyReference
method of thedataProvider
returnpageInfo
instead oftotal
.Other information:
This could be the culprit here as the
pagination
prop is not rendered unlesstotal
is defined.Environment
The text was updated successfully, but these errors were encountered: