Thank you for reporting this bug. We will make it our priority to review this report.
Ext.ux.GroupTabPanel and Ext.view.Table problem
Ext.ux.GroupTabPanel and Ext.view.Table problem
The example GroupTabPanel for Extjs v 4.2.1 doesn't work correctly. When you click on the first group header "Dashboard" you get an error. The error causes some flakey behaviour when clicking other items in the menu.
Code:
TypeError: b.getRowStyleTableEl(...) is null
The reason for this error is because the ux.GroupTabPanel uses a table view for its tree, but the table template in ux.GroupTabeRenderer is created from divs instead of a table. This results in the getRowStyleTableEl function returning null because it found no table element.A quick fix is to override getRowStyleTableEl in the viewConfig of the tree and always return Ext.fly(item). However, I think I may have also found a bug in Ext.view.Table.
Existing Ext.view.Table.getRowStyleTableEl()
Code:
getRowStyleTableEl: function(item /* view item or row index */) {
var me = this;
if (!item.tagName) {
item = this.getNode(item);
}
return (me.isGrouping ? Ext.fly(item) : this.el).down('table.x-grid-table');
},
I believe the last line should in fact be (note the placement of the round brackets):Code:
return (me.isGrouping ? Ext.fly(item) : this.el.down('table.x-grid-table'));
The reason it should be this way is because when grouping there is no table, and also because the node itself is the row styling element we want.I don't know if any of that was clear, but in short here's the two fixes:
1 - Ext.ux.GroupTabPanel needs to have "isGrouping:true" added to the tree viewConfig.
2 - Ext.view.Table.getRowStyleTableEl() last line should be "return (me.isGrouping ? Ext.fly(item) : this.el.down('table.x-grid-table'));"
jeudi 15 mai 2014
Ext.ux.GroupTabPanel and Ext.view.Table problem
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire