Directus 树视图界面仅适用于递归关系

Tyr*_*rom 9 treeview directus

我正在尝试使用直接树视图,但它一直告诉我“树视图界面仅适用于递归关系”。

不确定我做错了什么以及是否有人可以提供帮助。

team_page(单例,创建树视图项并选择 team_member 作为关系)

-team_member(外键设置为“team”,是通过在 team_page 集合上创建树视图并将其相关集合设置为“team_member”生成的)

结构

树视图关系

编辑:Directus 9.5.1

Kas*_*lgi 4

There's no information in the Directus documentation so I checked if the relational field "Tree view" works for displaying multi-level children of that item. I created first table Test, added string field name to it and then created "Many to One" relationship to the same table and named the "key" as parent_id. Now, I created relational field "Tree view" again to the same Test collection and set the "Foreign key" as parent_id. Display template I picked for the both Name.

然后我创建了以下树:https://i.stack.imgur.com/VgBRb.png将项目“二”的父项设置为“一”,将项目“三”的父项设置为“二”等.当我打开项目“One”时,它看起来符合预期: https: //i.stack.imgur.com/WOqXW.png