如何从React Admin中的参考文献中读取数据?
当我使用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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议您阅读
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