在React-Admin中立即访问和/或修改多个资源的数据

发布于 2025-02-07 04:50:38 字数 323 浏览 2 评论 0原文

我希望根据来自特定资源中所有记录的数据创建一个输入(不仅是当前正在编辑的记录中的ID引用的单个记录。

我想这样做的原因是因为我正在研究每个时间表的应用程序列表列出了该时间表的一部分,以及该时间表的列表,以及该时间表应适用的日期。

我想给用户一个UI选择每个时间表应适用的日期列表,理想地显示为日历(但这不是必需的)。 ,但似乎没有一个能够显示已分配给其他时间表/灰色的

日期现有的方法在React-Admin中做类似的事情?还是我需要挖掘< referencefield>的iMmentation,以制作我自己的版本,该版本不需要记录并返回所有记录?

I'm looking to create an input based on data from all records within a particular resource (not just a single one referenced by an ID present in the record currently being edited.

The reason I want to do this is because I'm working on a react-admin page for an app that deals with schedules. Each schedule has a list of time slots that are part of that schedule as well as a list of dates on which that schedule should apply. This is conceptually similar to a basic calendar.

I would like to give users a UI to select a list of dates that each schedule should apply, ideally presented as a calendar (but this isn't necessary). There are plenty of options to do this that are already available in react-admin, but none of them seem to provide me the ability to display dates that have already been assigned to other schedules as disabled/grayed out. This requires access all of the assigned dates for other schedules that aren't currently being edited.

Is there an existing way to do something like this in react-admin? or will I need to dig into the imlementation for <ReferenceField> to make my own version that doesn't need an ID for a record and just returns all records?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文