PDA

View Full Version : [OPEN] TreeGrid in vbox - node expansion truncated



cadror
22 Jun 2011, 1:34 PM
Hello,

I modified the TreeGrid example in ExtJS 4.0.2 (http://dev.sencha.com/deploy/ext-4.0.2/examples/tree/treegrid.html) (as shown in the diff below) to put the TreeGrid inside a container with vbox layout and restricted height. When I expand a node in the TreeGrid, the TreeGrid becomes truncated and does not correctly (1) display a scrollbar or (2) tell its parent to display a scrollbar. Is this a bug in ExtJS 4.0.2?



--- examples/tree/treegrid.js.bak 2011-06-22 14:27:42.332081072 -0700
+++ examples/tree/treegrid.js 2011-06-22 14:27:24.125513038 -0700
@@ -42,9 +42,7 @@
//Ext.ux.tree.TreeGrid is no longer a Ux. You can simply use a tree.TreePanel
var tree = Ext.create('Ext.tree.Panel', {
title: 'Core Team Projects',
- width: 500,
- height: 300,
- renderTo: Ext.getBody(),
+ autoScroll: true,
collapsible: true,
useArrows: true,
rootVisible: false,
@@ -86,5 +84,18 @@
sortable: true
}]
});
+
+ var container = Ext.create('Ext.Panel', {
+ renderTo: Ext.getBody(),
+ layout: {
+ type: 'vbox',
+ align: 'stretch'
+ },
+ items: [
+ tree
+ ],
+ height: 100,
+ autoScroll: true
+ });
});



Thanks for your consideration.