GithubHelp home page GithubHelp logo

Comments (8)

slax57 avatar slax57 commented on April 28, 2024

Thank you for opening this issue.

Indeed, currently the expand controller uses a Store key built only with the resource: `${resource}.datagrid.expanded`.

There is currently no way to override that store key (except passing a different resource).

We could introduce the ability to customize this store key (using e.g. the storeKey prop from the ListContext), but this would be a new feature.

Would you like to open a PR (against the next branch) to implement it?

from react-admin.

roxeteer avatar roxeteer commented on April 28, 2024

Would you like to open a PR (against the next branch) to implement it?

I will take a look.

from react-admin.

davidhenley avatar davidhenley commented on April 28, 2024

@slax57 I just came to ask this same question. Very annoying you can't pass storeKey down to the list context inside ArrayField. I would absolutely love this.

Is there any work around or should we just create a new implementation of ArrayField for now?

from react-admin.

roxeteer avatar roxeteer commented on April 28, 2024

@davidhenley I was about to implement this, but I wasn't sure what would be the best approach. I asked about it on Discord but never got a reply so I forgot the whole thing 🙈

from react-admin.

davidhenley avatar davidhenley commented on April 28, 2024

@roxeteer I'm digging through the ListContext source code right now, and am trying the same. It should be as simple as adding a prop and passing it down unless I'm missing something as the List just passes it to ListBase which passes it to the ListContext.

from react-admin.

roxeteer avatar roxeteer commented on April 28, 2024

@davidhenley I think the more React Admin-like approach would be to create yet another context for it. ListContext is quite huge already and it's probably not needed to be exposed. preferenceKey is passed around in similar manner, using its own context provider.

from react-admin.

davidhenley avatar davidhenley commented on April 28, 2024

I don't understand this logic, it would be the exact same as it is now, just pass it to ListContext under ArrayField. What am I missing?

from react-admin.

roxeteer avatar roxeteer commented on April 28, 2024

Maybe I was thinking it too complicated. It's been a while already so can't remember how it was exactly.

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.