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
Autocomplete ReferenceInput #70
Comments
In the blog example, you can see how the Comments list offers a filter by post at https://github.com/marmelab/admin-on-rest/blob/7e4409ddf9a7c2d912d7aaaafee5b9b84b9068be/example/comments.js#L8-L10. Is there a bug when you try to reproduce that? By the way, |
I've seen that sample, but what I would like to achieve is to filter the item present in the reference input, not the filtering my list like in the sample. If we take the post/comment example, what I would like to do is to filter the list of post when editing or creating the comment to only show post that match a predefined criteria. I'm not sure it would make sense in the example, but let's say we have thousand of post, I would like to only allow creating comment on post that have been published in the last week to limit my drop down to something manageable. Right now, the only way that I could do it is by creating a new resources in my api that will do that, I don't think I can leverage the filter mechanism outside the list resource "pages" Is that make more sense? |
Gotcha, you want an autocomplete select box. Yes, it's very necessary, but it's not very straight forward since Material UI doesn't provide one out of the box. |
Kind of, In my specific use case, when editing my item, the dropdown is always a subset of the entire set of reference resource. I'm assuming that getting the Autocomplete Reference Input would allow me to "hardcode" my search queries without any user input. |
Fixed by #199 |
Is there any way to add more filter on a reference input field.
By Example, I have a list of products that belong to a category and I would like to list only product that match to one category.
I've seen that the method crudGetMatching use in the ReferenceInputField can accept a filter, but it doesn't seem to be exposed anywhere.
The text was updated successfully, but these errors were encountered: