PDA

View Full Version : [FIXED] Grouping don't update panel height



traxanos
22 Sep 2011, 4:58 AM
REQUIRED INFORMATION


Ext version tested:

Ext 4..02


Browser versions tested against:

FF6
FF7


DOCTYPE tested against:

Strict
Transitional


Description:

You have a grid panel as a frame or inner other panel
If you now collapse or expand a group, the parent don't get an event for resize content height


Steps to reproduce the problem:

use a grid panel without height
collapse or expand a grid


The result that was expected:

the parent should resize height


The result that occurs instead:

the size of the parent panel or current frame border don't resize


Test Case:



Ext.override(Ext.grid.feature.Grouping, {
collapseAll: function() {
var self = this, view = self.view;
view.el.query(self.eventSelector).forEach(function (group) {
var group_body = Ext.fly(group.nextSibling, '_grouping');
self.collapse(group_body);
});
},

expandAll: function() {
var self = this, view = self.view;
view.el.query(self.eventSelector).forEach(function (group) {
var group_body = Ext.fly(group.nextSibling, '_grouping');
self.expand(group_body);
});
}
});

Ext.create('Ext.data.Store', {
storeId:'sampleStore',
fields:['name', 'category'],
data:{
items:[
{ name: 'Name 1', category: 'Group 1'},
{ name: 'Name 2', category: 'Group 2'},
{ name: 'Name 3', category: 'Group 1'},
{ name: 'Name 4', category: 'Group 2'},
{ name: 'Name 5', category: 'Group 1'},
{ name: 'Name 6', category: 'Group 2'},
{ name: 'Name 7', category: 'Group 1'},
{ name: 'Name 8', category: 'Group 3'},
{ name: 'Name 9', category: 'Group 1'},
{ name: 'Name 10', category: 'Group 2'},
{ name: 'Name 11', category: 'Group 1'},
{ name: 'Name 12', category: 'Group 4'},
{ name: 'Name 13', category: 'Group 1'}
]
},
proxy: {
type: 'memory',
reader: {
type: 'json',
root: 'items'
}
}
});

var groupingFeature = Ext.create('Ext.grid.feature.Grouping', {})

Ext.onReady(function() {


var test1 = Ext.create('Ext.grid.Panel', {
frame: true,
features: [groupingFeature],
title: 'Test1',
renderTo: 'test1',
style: 'margin: 10px auto;',
store: Ext.data.StoreManager.lookup('sampleStore'),
tbar: [
{
text: 'CollapseAll',
scope: groupingFeature,
handler: function() {
groupingFeature.collapseAll()
}
},
{
text: 'ExpandAll',
scope: groupingFeature,
handler: function() {
groupingFeature.expandAll()
}
}
],
columns: [
{
header: 'Name',
dataIndex: 'name'
},
{
header: 'Category',
dataIndex: 'category'
}
],
width: 1000
});
});


The expand and collapse method should fire an event to parent/current that the height was changed.


http://www.youtube.com/watch?v=4466QpM7Kn0

traxanos
22 Sep 2011, 5:03 AM
enable or disable grouping also infected.

traxanos
5 Oct 2011, 2:32 AM
where i can find the fix? i have test it with 4.0.6 and i have a support access for svn, but i can't find an update for this fix.