PDA

View Full Version : [CLOSED] TreePanel rootVisible: false does strange things



bone
25 Apr 2014, 4:17 PM
Ext.application({
name : 'Fiddle',

launch : function() {
Ext.create("Ext.tree.Panel",{
renderTo: Ext.getBody(),
width: 200,
height: 100,
title: "Foo",
rootVisible: false
});
}
});

This seemingly innocent panel will end in a
GET https://fiddle.sencha.com/TreeModel?_dc=1398470403775&node=root
and the panel breaking.

It is easily avoided by either setting

rootVisible: true,
or by defining a root with the children-property set to an empty array :-?

root: { children: [] }



I don't if it can be called a "bug", the rootVisible-config (http://docs.sencha.com/extjs/5.0.0/apidocs/#!/api/Ext.tree.Panel-cfg-rootVisible) does mention something that quite possibly is related.

However; I find the url and parameters suspicious.

What is it trying to do? Load the model, or the data? Or both? Are there some faulty assumptions?

The combination of:
1. wanting to hide the root node,
2. framework offering automated creation of a root node if treestore or root is undefined
3. the availability of the method setRootNode

makes having to set root: { children: [] } when I want to render the panel prior to fetching and/or building the tree to avoid this seem strangely unecessary.


That's all. Good night.

mitchellsimoens
29 Apr 2014, 3:50 AM
Thanks for the report! I have opened a bug in our bug tracker.