'How can i read data from ReferenceInput in React admin?
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>
Solution 1:[1]
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:
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | WiXSL |