I'm using React-Admin 3.5.0 with api-platform/admin 2.1.1.
I have a custom list for one of my resources.
The resource has a title and an author. The author has several properties, one of which is username.
Following the documentation, I tried to display the username of the author in my list like this:
export const MyList = (props) =>
<List {...props}>
<Datagrid>
<TextField source="title" />
<TextField source="author.username" />
</Datagrid>
</List>
This does not work. The field for author.username is empty.
I investigated a bit and found that the record only contains the ID of the author:
record:
...
title: "abcde"
author: "/users/1"
The response from the server however does contain the username property:
0: {
...,
"title": "abcde",
"author": {
"@id": "/users/1",
"username": "Test"
}
},
...
Is there any nice way to make it work?
