PDA

View Full Version : [FIXED][3.1pre] GridView.processRows() bug



extjs@peacetech.com
7 Dec 2009, 1:07 PM
idx is undefined variable. looks like it was transfered from 2.0


Ext.each(rows, function(row, idx){
row.rowIndex = idx;
row.className = row.className.replace(this.rowClsRe, ' ');
if (!skipStripe && (idx + 1) % 2 === 0) {
row.className += ' x-grid3-row-alt';
}
});


in 3.0 loop is different but idx was not changed



processRows : function(startRow, skipStripe){
64835 if(!this.ds || this.ds.getCount() < 1){
64836 return;
64837 }
64838 var rows = this.getRows(),
64839 len = rows.length,
64840 i, r;
64841
64842 skipStripe = skipStripe || !this.grid.stripeRows;
64843 startRow = startRow || 0;
64844 for(i = 0; i<len; i++) {
64845 r = rows[i];
64846 if(r) {
64847 r.rowIndex = i;
64848 if(!skipStripe){
64849 r.className = r.className.replace(this.rowClsRe, ' ');
64850 if ((idx + 1) % 2 === 0){
64851 r.className += ' x-grid3-row-alt';
64852 }
64853 }
64854 }
64855 }

evant
7 Dec 2009, 1:11 PM
Agreed, fixed, thanks.