Is it possible to define an empty TreeStore without a root: {} config and use a node from JSON as root?
TreeStore with Root from Json, how?
I can't get it to work properly without a static root defined in the TreeStore.
It's working and the static root node is hidden, but I can't see why I needs to be there.
Here is the JSON I would like to use for my Tree. (My Root should be the root node).
Code:
{
"data": {
"id": 0,
"name": "My Root",
"expanded": true,
"data": [
{
"id": 5,
"name": "Test 1",
"data": [
{
"id": 6,
"name": "Sub Folder",
"loaded": true
}
]
},
{
"id": 7,
"name": "Test 2",
"loaded": true
},
{
"id": 8,
"name": "Test 3",
"loaded": true
}
]
}
}
TreeStore with Root from Json, how?
Aucun commentaire:
Enregistrer un commentaire