I am trying to implement the FuelUX tree plugin and I have been following the example so far, but I need a nested structure. I assume the tree plugin is able to handle nested children? it is right?
var treeDataSource = new TreeDataSource({ data: [ { name: 'Test Folder 1', type: 'folder', additionalParameters: { id: 'F1' }, data: [ { name: 'Test Sub Folder 1', type: 'folder', additionalParameters: { id: 'FF1' } }, { name: 'Test Sub Folder 2', type: 'folder', additionalParameters: { id: 'FF2' } }, { name: 'Test Item 2 in Folder 1', type: 'item', additionalParameters: { id: 'FI2' } } ] }, { name: 'Test Folder 2', type: 'folder', additionalParameters: { id: 'F2' } }, { name: 'Test Item 1', type: 'item', additionalParameters: { id: 'I1' } }, { name: 'Test Item 2', type: 'item', additionalParameters: { id: 'I2' } } ], delay: 400 });
So far, it seems, top-level items are being loaded into open folders, not nested data items. This is what the demo does on its site, but it doesn’t look like its desired interaction. Can anyone confirm if this is the expected behavior?
Can someone tell me the code where they created the nested data tree using this plugin? Is there something really obvious that I'm missing?
source share