Closed remiremi closed 3 years ago
For example if you have countries associated to book authors, and you want to show all books for a given country you could now do
const CountryShow = (props: any) => { return ( <Show {...props}> <SimpleShowLayout> <TextField source="name" /> <ReferenceManyField perPage={5} label="Book" reference="book" target="author.country_id" sort={{ field: "written", order: "DESC" }} > <Datagrid rowClick="show"> <TextField source="name" /> <DateField source="written" /> <DateField source="published" /> </Datagrid> </ReferenceManyField> </SimpleShowLayout> </Show> ); };
@remiremi this repository is now depreciated. The Hasura organization has adopted and now maintains this library. Going forward, you can use this: https://github.com/hasura/ra-data-hasura
For example if you have countries associated to book authors, and you want to show all books for a given country you could now do