PDA

View Full Version : [OPEN] forceFit and Ext.grid.Panel



pedwards
19 May 2014, 3:20 AM
The forceFit only resizes the headers and not the contents on the first redraw. To reproduce:



var tree = Ext.create('Ext.tree.Panel', {
renderTo: Ext.getBody(),
title: 'TreeGrid',
forceFit: true,
fields: ['name', 'description', 'extra1'],
columns: [{
xtype: 'treecolumn',
text: 'Name',
dataIndex: 'name',
sortable: true
}, {
text: 'Description',
dataIndex: 'description',
sortable: true
}, {
text: 'Extra1',
dataIndex: 'extra1',
sortable: true
}],
root: {
name: 'Root',
description: 'Root description',
extra1: 'foo',
expanded: true,
children: [{
name: 'Child 1',
description: 'Description 1',
extra1: 'bar',
leaf: true
}, {
name: 'Child 2',
description: 'Description 2',
extra1: 'baz',
leaf: true
}]
}
});


This is edited from the example here: http://docs.sencha.com/extjs/5.0.0/components/trees.html

Regards,
Paul

pedwards
19 May 2014, 3:28 AM
Setting a flex parameter for each column fixes this (although it wasn't necessary in extjs4)

Regards,
Paul

mitchellsimoens
19 May 2014, 3:45 AM
This is a known issue, have linked this thread to the issue above.