PDA

View Full Version : Tree panel: inconsistent tree node width



gtdev
12 Apr 2014, 12:35 PM
In ExtJS 5.0.0.736, since table elements are used for each row from now on, the width of tree nodes does not fill the container, you can observe whitespace on the right of the nodes. It seems this does not happen on first render but on consecutive renders/layouts. For example, expanding a node will trigger this problem.

LesJ
16 Apr 2014, 5:45 AM
Is this visible in the Ext JS 5 examples provided by Sencha? If not, can you create a demo?

nomack84
16 Apr 2014, 8:02 AM
I have the same problem in my app, so there are two of us.

gtdev
16 Apr 2014, 8:26 AM
Yes, it happens with a simple tree on all browsers and with all themes.

Just paste the below code on https://fiddle.sencha.com/ and click collapse icon of "homework" node and you will immediately see the bug in effect.



Ext.application({
name : 'Fiddle',
launch : function() {
var store = Ext.create('Ext.data.TreeStore', {
root: {
expanded: true,
children: [
{ text: "detention", leaf: true },
{ text: "homework", expanded: true, children: [
{ text: "book report", leaf: true },
{ text: "algebra", leaf: true}
] },
{ text: "buy lottery tickets", leaf: true }
]
}
});
Ext.create('Ext.tree.Panel', {
title: 'Simple Tree',
width: 400,
height: 300,
store: store,
rootVisible: false,
renderTo: Ext.getBody()
});

}
});

LesJ
16 Apr 2014, 8:57 AM
Thanks gtdev. I saved your fiddle here (https://fiddle.sencha.com/#fiddle/554).

LesJ
24 Apr 2014, 11:49 AM
bump

rkuka
18 Sep 2014, 4:21 AM
I have the same problem. Moreover, when you have label longer than width of treepanel, that node has different width than other nodes. Sample is here (https://fiddle.sencha.com/#fiddle/ahu).

hlev
23 Nov 2014, 10:51 AM
Same problem here. My tree is in the 'west' region of a viewport with border layout. The tree is bound to a treestore. The width of the tree panel is adjusted to the width of the region correctly, as the first 'resize' event reports, but the nodes' are not. They only adjust to 100% on the subsequent resize events. I can't figure out where to hook in to make the nodes fill all the available space.

gtdev
7 Dec 2014, 11:47 AM
Bump. This problem is not fixed or even examined since initial v5.0. I know it's a cosmetic UI issue and not an important functional issue but please fix this UI glitch for the final v5.1 because it annoys the perfectionists like me :)