【发布时间】:2017-05-23 14:45:46
【问题描述】:
我有一个故事资源,我想根据故事状态以不同方式为同一用户显示该资源
status = NEW 的故事应该与 List1 一起显示
states = APPROVED 等的故事需要显示为 List2(我需要显示故事的不同属性)
如何使用 Admin-On-Rest 实现这一目标?
两次添加相同的资源(如下)并为两者分配不同的列表视图只会导致第一个被显示而第二个被忽略
<Resource name="tales" list={EditorAssignedList} edit={EditTale} options={{ label: 'Assigned Tales' }}/>
<Resource name="tales" list={EditorTaleTrack} options={{ label: 'Your Tales' }}/>
记录了以下错误。
flattenChildren(...): Encountered two children with the same key, `1:$tales`. Child keys must be unique;
关于如何将唯一键注入资源的任何策略。
【问题讨论】:
标签: admin-on-rest