Giter VIP home page Giter VIP logo

Comments (5)

fzaninotto avatar fzaninotto commented on April 26, 2024 2

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.

from react-admin.

fzaninotto avatar fzaninotto commented on April 26, 2024

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, <ReferenceInput> is now documented.

from react-admin.

bjet007 avatar bjet007 commented on April 26, 2024

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?

from react-admin.

bjet007 avatar bjet007 commented on April 26, 2024

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.

from react-admin.

fzaninotto avatar fzaninotto commented on April 26, 2024

Fixed by #199

from react-admin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.