ritcoder
15 Feb 2012, 2:34 PM
Hi,
I'm having an interesting scenario where when a tree node is expanded, it shows a bit of its items and then disappears altogether. At the moment, I'm unable to tell what causes that.
Part of the code I'm using the refresh the tree is as below.
refreshRoot: function () {
var me = this;
this.refresh(this.folder, function (ret) {
if (!ret.success) {
info(ret.message, 'Refresh folder failed');
return;
}
ret.data.expanded = true;
me.tree.store.setRootNode({ text: 'Project File', expanded: true, children: [ret.data] });
});
},
ret.data is like this
{text:'Text',path:'/',children: [
{text:'Some entry',leaf:true, path:'/someentry'},
{text:'Some folder', path:'/someFolder',children: [...]}
]}
Could it be the cause or this is a bug?
I'm having an interesting scenario where when a tree node is expanded, it shows a bit of its items and then disappears altogether. At the moment, I'm unable to tell what causes that.
Part of the code I'm using the refresh the tree is as below.
refreshRoot: function () {
var me = this;
this.refresh(this.folder, function (ret) {
if (!ret.success) {
info(ret.message, 'Refresh folder failed');
return;
}
ret.data.expanded = true;
me.tree.store.setRootNode({ text: 'Project File', expanded: true, children: [ret.data] });
});
},
ret.data is like this
{text:'Text',path:'/',children: [
{text:'Some entry',leaf:true, path:'/someentry'},
{text:'Some folder', path:'/someFolder',children: [...]}
]}
Could it be the cause or this is a bug?