GithubHelp home page GithubHelp logo

Comments (16)

fzaninotto avatar fzaninotto commented on April 25, 2024 1

I think we should NOT reuse <ReferenceInput>, because that would add too many ifs to the code, and make its API confusing. Instead, create a <ReferenceManyInput> and a <SelectManyInput>.

from react-admin.

fzaninotto avatar fzaninotto commented on April 25, 2024

We have plans to make admin-on-rest as awesome as ng-admin. No, even more.

But it will take months. We need all the help you can give.

The chip input seems OK for an array value, but for references you need autocomplete. I don't see anything of acceptable quality in material UI land, do you have other ideas?

I'm closing this one as we won't open one issue for every ng-admin feature that needs to be ported. Feel free to continue the discussion about the implementation even though the issue is closed.

from react-admin.

fnberta avatar fnberta commented on April 25, 2024

This chip input component actually supports autocomplete. If you go to the demo storybook and select "with auto complete, open on focus", you actually get a similar experience to what is now in ng-admin. I hope I'll find the time this week to take a closer look.

from react-admin.

fzaninotto avatar fzaninotto commented on April 25, 2024

Reopening this one as it'll guide us for future enhancements.

from react-admin.

leesei avatar leesei commented on April 25, 2024

Alas, I need this one also.
Guess that'll be another PR 🎉 .

from react-admin.

kimkha avatar kimkha commented on April 25, 2024

@fzaninotto Can I add material-ui-chip-input to aor dependencies and make PR? I'm happy to help, but I wonder what is the true way to do that kind of thing.

from react-admin.

fzaninotto avatar fzaninotto commented on April 25, 2024

@kimkha Yes, it's a small dependency, no problem. Could you and @leesei coordinate efforts?

from react-admin.

leesei avatar leesei commented on April 25, 2024

@kimkha I haven't started on it yet but I'll implement it before mid-April.
Are you free to start it now?

from react-admin.

kimkha avatar kimkha commented on April 25, 2024

I'm OK to start now, but I think it take time to start, because I'm new with AOR :)

Which function should we support? Array values, reference to many,... what's more?

from react-admin.

leesei avatar leesei commented on April 25, 2024

I suppose <ReferenceManyInput> will bind to a array of ids to source.
I'm not sure if we need a <SelectManyInput>/<MultiSelectInput>.

from react-admin.

kimkha avatar kimkha commented on April 25, 2024

Currently, we have <ReferenceManyField>. I think we must separate to 2 inputs: <ReferenceManyInput> for reference, and <ArrayInput> for array only. Because they look like difference...

The first thing, we must handle API calling, and when user choose one, we need to insert the ID of item. But in case of second one, we just only insert the text.

from react-admin.

kimkha avatar kimkha commented on April 25, 2024

I change my mind. I think we should re-use <ReferenceInput>, but its children is <ArrayInput>. That might be easy to implement and make AOR better reusable.

from react-admin.

kimkha avatar kimkha commented on April 25, 2024

@fzaninotto What do you think about that idea? If yes, I need to change <ReferenceInput> in fetchReferenceAndOptions to add crudGetMany...

from react-admin.

kimkha avatar kimkha commented on April 25, 2024

DONE. I will make PR.

from react-admin.

darksonic37 avatar darksonic37 commented on April 25, 2024

This should be closed, the change has been merged for a while now, no?

from react-admin.

fzaninotto avatar fzaninotto commented on April 25, 2024

Right, fixed in #597

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.