I'm building an app with react-admin, I have an organizations resource and programs resource. each program has relation to one organization. (saved in mongoDB anf I have a node server)
I created a custom list to organizations resource.
<List {...props}>
<Datagrid rowClick={programsRowClick}>
<TextField source="name" />
<EditButton />
</Datagrid>
</List>
I want when we click on organization row to recieve all the programs that have the same organizationId.
the API is: https://localhost:4000/api/organization/${id}/programs
I tried to create a custom function programsRowClick but I dont realy understand what should it return?
the react run on https://localhost:3000 the server run on https://localhost:4000/api
could you help me?
thank's!