反应管理员如何在ReferenceField中连接源 [英] React-admin | How to concat source inside ReferenceField

查看:52
本文介绍了反应管理员如何在ReferenceField中连接源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个表"fos_user"和"version",我想显示"9.0.1.A"而不是"/version/1".

I have a table "fos_user" and "version", I would like to display "9.0.1.A" instead of "/ version / 1".

=> fos_user https://i.imgur.com/C8f0qor.png

=>版本 https://i.imgur.com/HFSKIdz.png

是否可以像这样将版本"表的字段连接起来以在源中显示它? https://i.imgur.com/rxJBmtp.png

Is it possible to concatenate the fields of the "version" table to display it in the source, like this? https://i.imgur.com/rxJBmtp.png

因为它将阻止我在版本"表中创建新字段.

Because it will prevent me from creating a new field in the "version" table.

最诚挚的问候,

推荐答案

反应管理员|如何在ReferenceField中连接源?

答案:

<代码>< ReferenceField label =版本" source =版本" reference =版本">< FunctionField render = {version =>`$ {version.major}.$ {version.minor}.$ {version.patch}.$ {version.letter}`}/></ReferenceField>

这篇关于反应管理员如何在ReferenceField中连接源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆