我正在尝试从其父级编辑和查看列表。 我想如果您想找一位作者并添加/更改/删除/查看他们撰写的书籍,您可以将它与之进行比较。 这是JSON,我已经尝试使用ArrayField和ReferenceArrayField。
initiatives: {
"id": 21,
"title": "fdg",
"description": "<p>fdg</p>",
"responsible": null,
"start_date": null,
"end_date": null,
"created_by": null,
"updated_by": {
"id": 1,
"firstname": "Marius",
"lastname": "test",
"username": null
},
"kpi": [
{
"id": 1,
"title": "Test KPI",
"goal": "3000",
"currentvalue": "2000",
"startvalue": "1000",
"importance": 99
},
{
"id": 2,
"title": "Test KPI 2",
"goal": "2000",
"currentvalue": "1000",
"startvalue": "500",
"importance": 1
}
],
}
这是我尝试过的
<ArrayInput source="initiatives.kpi">
<SimpleFormIterator>
<TextInput source="title" />
<TextField source="id" />
</SimpleFormIterator>
</ArrayInput>