View Full Version : [4.1b2] Tree Node items disappear as soon as the node is expanded

15 Feb 2012, 2:34 PM
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');
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?

16 Feb 2012, 4:51 AM
If you take that out does it work?

17 Feb 2012, 1:14 AM
Dont really know how I'll take that out.
That is how I load the data into the tree.
I call that function after rendering the tree and also when the user clicks a refresh button.

Is there another way of doing the same thing without using that function?

18 Feb 2012, 11:31 AM
I've not had this issue for a while now since I turned of animation for the treepanel.
Could that be the cause?