Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Bug: _selection_ in request data (includes fix)

$
0
0
1. Smartclient v10.0p_2014-11-20/LGPL

Problem: using a RestDataSource with JSON dataprotocol, when calling saveAllEdits on a listgrid all rows where the selection is changed are also send back to the server. This is because Listgrid saves _selection_ state in the record data.

Solution is to clean the recorddata of editvalues.
Hotfix:
Code:

isc.ListGrid.addMethods({
        _getEditValues : function (valuesID, colNum) {
            // we may be passed the editValues object, in which case we're passing it back again,
            var editSession = this.getEditSession(valuesID, colNum);
            // Added getCleanRecordData
            return editSession != null ? this.getCleanRecordData(editSession._editValues) : null;
        } 
})

This method is in ISC_Grids.js@48206.

I don't know the impact of not having the _selection_ in the editValues, but it looks like it's working on my side (I've screened the code and did not find any references).

Viewing all articles
Browse latest Browse all 4756

Trending Articles