if rowIdentity is overriden, data changes are not detected properly
#4,374 opened on 2015年9月15日
説明
Hi.
I encounter some difficulty with ui-grid 3.0.6, I'm new to it, so I did a lot of copy/paste, and I did copy a code chunk where rowIdentity is overriden.
From here: http://ui-grid.info/docs/#/tutorial/401_AllFeatures
When it's the case, and when I try to update a Row after a cellEdition, the new data are not being displayed event if you try some refresh(), refreshRows() or notifyDataChanges
in my init I have this
$scope.gridApi.edit.on.afterCellEdit($scope, $scope.saveARow)
And in my saveARow function I did something like this :
$scope.gridOptions.data[rowIndex] = newRow;
If rowIdentity is overriden, data are not diplayed See. http://plnkr.co/edit/tVRnVxcOfgO8xEHRWj00?p=preview
You'll have to edit a cell put whatever in it, it 'simulate' a call to a save server side, then replace te savedRow by what is present serverside after 3 seconds.
If you comment le rowIdentity override line 28 it will works