Get the first visible node through the Ext.data.NodeInterface defined
"firstChild" element and expand that if there's only one archive
present.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
'backup-type': view['backup-type'],
'backup-time': view['backup-time'],
});
- store.load();
- store.getRoot().expand();
+ store.load(() => {
+ let root = store.getRoot();
+ root.expand(); // always expand invisible root node
+ if (root.childNodes.length === 1) {
+ root.firstChild.expand();
+ }
+ });
},
control: {