如何从React Admin中的参考文献中读取数据?

发布于 2025-01-23 21:14:44 字数 527 浏览 3 评论 0原文

当我使用ReferencInput时,它会将请求发送到服务器,是否可以以某种方式读取我从ReferencInput服务器收到的内容,并在最远的情况下使用这些值。谢谢您的任何帮助!

<ReferenceInput
      label="Person"
      source={`${parentSourceWithIndex}.person.id`}
      reference="people"
      resource={resource}
      perPage={INPUT_ITEMS_PER_PAGE}
    >
      <SelectInput
        onChange={(event) => console.log(event)}
        resource={resource}
        optionText="fullName"
        inputType="create"
        fullWidth
      />
    </ReferenceInput>

When I use the referencinput, it sends a request to the server, is it possible to somehow read what I received from the referencinput server and use these values in the farthest. Thank you for any help!

<ReferenceInput
      label="Person"
      source={`${parentSourceWithIndex}.person.id`}
      reference="people"
      resource={resource}
      perPage={INPUT_ITEMS_PER_PAGE}
    >
      <SelectInput
        onChange={(event) => console.log(event)}
        resource={resource}
        optionText="fullName"
        inputType="create"
        fullWidth
      />
    </ReferenceInput>

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

得不到的就毁灭 2025-01-30 21:14:44

我建议您阅读Reference Input文档的前两段:

https”> https ://marmelab.com/reaect-admin/referenceinput.html

以及链接usechoicescontext文档:

https://marmelab.com/react-admin/usechoicescontext.html

I suggest you to read the first two paragraphs of the ReferenceInput documentation:

https://marmelab.com/react-admin/ReferenceInput.html

As well as the linked useChoicesContext documentation:

https://marmelab.com/react-admin/useChoicesContext.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文