-
-
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
ReferenceManyField with a List and Datagrid does not apply filter #5722
Comments
Further evidence, assuming I have not missed something entirely here, is taking the React Admin sandbox in the advanced tutorials. Its the one showing the tabbed show view with a list of comments as the last tab. Most entries have 1-2 comments displayed when browsed. https://codesandbox.io/s/2393m2k5rj In the PostShow.js source file, inject |
https://marmelab.com/react-admin/Fields.html#referencemanyfield |
I've exactly the same use-case with one-to-many relationship. And I'm trying to add a search filter to @fzaninotto can this be achieved on the user-land? |
I'm currently stucking at the same point. Do you guys want to enable |
just if somebody stops here, it's at least possible to use pagination as referenced here. |
For your information, we're currently working on |
Hi, I was facing that issue couple minutes ago. and i wrapped the Datagrid in a List so it's like that now
that worked for me |
That will make two calls to the resource one for |
What you were expecting:
In a TabbedShowLayout, one of the tabs should show a Datagrid of associated records with filter and pagination. The Datagrid should only see records with the target value filter applied.
What happened instead:
An initial getList call is made with no filter applied, ignoring the target. A second getMultipleReferences call is made with the filter and sorting applied, the resulting payload is correct, but it never displayed. The original value is used. Applying a user filter after makes a getList call, sets the filter, but without the target value filter being applied.
This does not seem correct to me with the double initial call and dropping the target filter from the ReferenceManyField. Removing the List component from the code does retain the proper target filtering, but at the expense of the pagination and user filter abilities.
Related code:
Environment
The text was updated successfully, but these errors were encountered: