-
-
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
ReferenceManyCount
renders a corrupted link
#8750
Comments
ReferenceManyCount
renders link as a span
ReferenceManyCount
renders a corrupted link
Reproduced, thanks! |
Sorry @oleg-semyonov I did not see you had already opened a PR for this issue. |
Wow, thanks for such a quick response! I checked your PR, and indeed that's a much more permanent solution. I closed my PR in favor of yours. |
@oleg-semyonov plot twist: #8754 (comment) actually gives arguments in favor of your PR 😁 |
Re-opened the PR! Please check my solution for the |
It looks good to me, thanks! |
What you were expecting:
When used with
link
prop,ReferenceManyCount
should render a clickable link that leads to the filtered resource pageWhat happened instead:
The link is rendered as
span
tag withto
attribute set to[object Object]
.Steps to reproduce:
It is actually reproducible on the simple example straight out of the box. Just click "inspect" on any "Nb comment" field in Posts grid.
Other information:
This is easily fixable by removing a single line:
react-admin/packages/ra-ui-materialui/src/field/ReferenceManyCount.tsx
Line 82 in 1a1b80a
I've filed a PR with the proposed change: #8752
I don't think using
span
was intended, probably just flowed over fromTypography
component props below.Environment
The text was updated successfully, but these errors were encountered: