Giter VIP home page Giter VIP logo

Comments (4)

fzaninotto avatar fzaninotto commented on March 29, 2024

Elaborating on my previous comment: using Field components is a bad idea as they're intended for HTML, and contain HTML tags (e.g. <TextField> outputs <span>foo</span>).

Besides, the Reference fields are asynchronous, and as such will be hard to include in a string for the user to download - we'll have to know when all the actions have been dealt with.

So we're left with:

  • rewrite all the Field components as simple functions, minus the HTML, and rewrite the Reference field logic to bypass Redux and look more synchronous, or
  • use an export function and leave the reference fetching as an exercise to the user
const PostExport = (props) => (
    <Export {...props} render={record => Promise.resolve({
         Id: record.id,
         UserId: record.userId,
         User: ???, // use fetch
         Title: record.title.toLowercase(),
         Body: record.body,
    })}>
);

from react-admin.

afilp avatar afilp commented on March 29, 2024

@fzaninotto I really need this a lot! Thanks for thinking about that, was any progress made to that, in 'next' for example?

from react-admin.

fzaninotto avatar fzaninotto commented on March 29, 2024

No, we haven't implemented it in next. This is still an open issue.

from react-admin.

fzaninotto avatar fzaninotto commented on March 29, 2024

Implemented in 2.2, see #2034

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.