Opened 8 years ago

Closed 8 years ago

#13902 closed defect (fixed)

Obsolete parameter passed along in dojox/grid/_EditManager.restore()

Reported by: Evan Owned by: Evan
Priority: high Milestone: 1.7
Component: DojoX Grid Version: 1.7.0b1
Keywords: Cc:
Blocked By: Blocking:

Description

Found by Chris Lee from http://dojotoolkit.org/community/#nabble-td3316370

"The method "restore" in dojox.grid._EditManager has following content:

restore: function(inView, inRowIndex){
        // summary: 
        //	 Restores the grid editing state 
        // inRowIndex: Integer 
        //	 Grid row index 
        // inView: Object 
        //	 Grid view 
        var c = this.info.cell; 
        if(this.isEditRow(inRowIndex) && c.view == inView && c.editable){ 
               ''' c.restore(c, this.info.rowIndex);'''
        } 
}

The bold code will call cell inline-edit widgets's base class dojox.grid.cells._Base.restore as below:

restore: function('''inRowIndex'''){
        // summary: 
        //	restore editor state 
        // inRowIndex: int 
        // grid row index 
        this.setValue(inRowIndex, this.value);
        //console.log("restore", this.value, inCell.index, inRowIndex); 
}

Note the parameters passed in the first function are cell and row index, while the second method receives row index and throws away the value. I see most dojox.grid.cells._Base's sub classes doesn't use the inRowIndex param, but if I want to add a new sub class for custom inline-edit, the inRowIndex param is not correct."

Change History (1)

comment:1 Changed 8 years ago by Evan

Resolution: fixed
Status: newclosed

In [26569]:

Fixes #13902 by removing the 1st obsolete parameter of dojox/grid/_EditManager.restore()

Note: See TracTickets for help on using tickets.