Reputation: 11
I got stuck a little bit:
I've got Field A which is for querying the projects (Select field -> ReferenceInput) when the user hits this, we should only show the user on Field B (Select Field -> ReferenceInput) the relevant tasks based on the projectId.
How could I achieve this?
Link to image to visualise the problem
Upvotes: 1
Views: 1374
Reputation: 501
What you’re looking for is the useFormState or FormDataConsumer. Take a look in the docs and let me know if you have any other questions related.
https://marmelab.com/react-admin/Inputs.html#linking-two-inputs
Upvotes: 1