I'm trying to figure out how I can use datamanager and self-referential data. The documentation appears to be pretty sparse on that.
I have a multi-level object like
[{
"data": [
{ "id": 1, "name": "A" },
{
"id": 2,
"name": "B",
"children": [
{ "id": 3, "name": "B1" },
{
"id": 4,
"name": "B2",
"children": [
{ "id": 5, "name": "B2.1"},
{ "id": 6, "name": "B2.2" },
{ "id": 7, "name": "B2,3" },
{ "id": 8, "name": "B2.4" },
]
},
{ "id": 99, "name": "C" },
If I use the fields property with this json as static data it works fine:
fields: {
dataSource: someLocalData.data,
value: 'id',
text: 'name',
child: 'children',
}
Now I have created a service that returns this same structure, wrapped into "result" and "count", for the dataManager.
The documented example only has 2 levels of query; how do I configure the query to work with self-referential data please?