PDA

View Full Version : [DONE]GroupingView - expose a method



mjlecomte
29 Jun 2009, 12:02 PM
GroupingView has a lot of private methods. I was looking through from another forum question. Looks like a potential useful method could be extracted from a private event handler (moved code shown light grey to new location shown in red):



// private
onBeforeRowSelect : function(sm, rowIndex){
/*
if(!this.enableGrouping){
return;
}
*/
this.toggleRowIndex(rowIndex);
/*
var row = this.getRow(rowIndex);
if(row && !row.offsetParent){
var g = this.findGroup(row);
this.toggleGroup(g, true);
}
*/
},

/**
* Toggle the group at the specified row index.
* @param {Object} rowIndex
*/
toggleRowIndex : function(rowIndex){
if(!this.enableGrouping){
return;
}
var row = this.getRow(rowIndex);
if(row && !row.offsetParent){
var g = this.findGroup(row);
this.toggleGroup(g, true);
}
}

evant
8 Sep 2009, 9:09 PM
Fix applied to svn in rev #5306 for patch release 3.1.