-
25 Apr 2012 1:45 PM #1
[4.1.0] Grid Group's groupHeaderTpl does not have parent param
[4.1.0] Grid Group's groupHeaderTpl does not have parent param
REQUIRED INFORMATION
Ext version tested:- Ext 4.1.0
- Build date: 2012-04-20 14:10:47 (19f55ab932145a3443b228045fa80950dfeaf9cc)
- Chrome
- In converting from 4.0.7, I noticed my groupHeaderTpl wasn't working.
- It was referencing the parent parameter, which is there in the documentation.
- That variable is now hardcoded to be an empty object.
- Run the example code in 4.0.7 and 4.1.0
- parent would have a similar value in 4.1.0
- parent was an empty object
Code:Ext.create("Ext.window.Window", { width:500, height:500, layout:"fit", items:[ { xtype:"grid", store:{ proxy:{ type:"memory", reader:{ type:"json" } }, model:Ext.define("MyModel", { extend:"Ext.data.Model", fields:[ "group_name", "col_1", "col_2" ] }), groupers:[ { property:"group_name" } ], data:[ { group_name:"Group 1", col_1:"11", col_2:"12" }, { group_name:"Group 2", col_1:"21", col_2:"22" }, { group_name:"Group 3", col_1:"31", col_2:"32" } ] }, columns:[ { text:"Column 1", dataIndex:"col_1" }, { text:"Column 2", dataIndex:"col_2" } ], features:[ { ftype:"grouping", groupHeaderTpl:"{[console.log(arguments)]} {name}" } ] } ] }).show();
-
25 Apr 2012 1:51 PM #2
Here is an abbreviated version of what I'm seeing:
ExtJS Version values parent 4.0.7 {fullWidth:200, name:"Group 1", rows:[{...}], viewId:"gridview-1102"} {fullWidth:200, [{...},{..},{...}]} 4.1.0 {children:[{...}], fullWidth:200, name:"Group1", rows:[{...}], ...} {}
The grid's tpl is calling Ext.grid.feature.Grouping.getFragmentTpl, and the .apply() on Ext.XTemplate calls Ext.XTemplate.applyOut. The third parameter on me.fn.call() is the hardcoded empty object.
Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJSIV-6050
in
4.1.


Reply With Quote