Closed crimsdings closed 1 year ago
@EdgarGomez https://github.com/nazirov91/ra-strapi-rest/issues/27 also seemed to have problems with the same issue - i dont know if he ever came up with a solution.
Hey @crimsdings can you try something like:
<ReferenceManyField label="Comments by" source="user" reference="users"> <SingleFieldList> <ChipField source="username" /> </SingleFieldList> </ReferenceManyField>
in the meantime i found out, that i dont need a reference field at all, since there is already the array in the json due to the strapi relation field so a:
`
</ArrayField>`
did work for my use case - however now i dont know how to count the results in an arrayfield ;p
expanding the README for relations would be helpfull
Hi!
Please see the readme file. I have updated the package to make it work with Strapi V4. Also added a demo repo for reference. Please open a new issue if the problem persists.
Thanks!
I fail to understand if this Data Provider is supposed to work with Strapi Realtions and React-Admins ReferenceManyField or ReferenceArrayField - can you please add examples to the ReadMe for those use cases ?
For my specific issue:
I have 2 collections Users and Groups - with a one user to many groups relation field in strapi (reference field is called re_groups in users and re_users in groups)
if i use a 1:1 relation this works without an issue
`
`
but if i use a ReferenceManyField target seems to be ignored or i simply dont understand what the target is supposed to be:
according to https://marmelab.com/react-admin/Fields.html#reference-fields
`
`
same goes for the ReferenceArrayField - basic examples with the relationship field of strapi should get added.
thank you!