PDA

View Full Version : [FIXED] Ext.view.Table.collectData with rowexpander



sunsay
8 Nov 2011, 7:42 AM
ExtJS: 4.0.2

In my grid i have rowexpander plugin and a getRowClass method in a viewConfig.
At the first load of my grid i see rows collapsed, but icon of an expander is [-] (must be [+])

So i had to modify Ext.view.Table.collectData
from:


preppedRecords[j]['rowCls'] = this.getRowClass(records[j], j, rowParams, this.store);


to:


preppedRecords[j]['rowCls'] += ' ' + this.getRowClass(records[j], j, rowParams, this.store);


and now it works together

mitchellsimoens
8 Nov 2011, 11:43 AM
Have you tried this with a later version to see if the bug is still there?

sunsay
9 Nov 2011, 4:20 AM
Yes. the bug is still here:

REQUIRED INFORMATION

Ext version tested:

Ext 4.0.7
Steps to reproduce the problem:

Edit /examples/grid/grid-plugins.js (line 113)


[...]
plugins: [{
ptype: 'rowexpander',
rowBodyTpl : [
'<p><b>Company:</b> {company}</p><br>',
'<p><b>Summary:</b> {desc}</p>'
]
}],
viewConfig: {
getRowClass: function(record) {
return 'someclass';
}
},
collapsible: true,
animCollapse: false,
[...]


The result that was expected:

Normal rowexpander behavior
The result that occurs instead:

At the first load of grid i see rows collapsed, but icon of an expander is [-] (must be [+])
HELPFUL INFORMATION

Screenshot or Video:
29169

Possible fix:

Ext.view.Table.collectData:

preppedRecords[j]['rowCls'] += ' ' + this.getRowClass(records[j], j, rowParams, this.store);

astrocybernaute
20 Jan 2012, 3:49 AM
any update on this bug please?
i also have the same problem in 4.0.7
thanks