ui-grid
ui-grid copied to clipboard
Angular UI grid - Enabling saveRowIdentity using grid options
@c0bra How to enable 'saveRowIdentity' grid options?
Since ui-grid saving the index of the grid row to persist the selection after data operations. this would cause the issue when we doing sorting. Enabling 'saveRowIdentity' will solve this by saving the row entity instead of index so, we can do the trick with row entity and select back the correct row even after the sorting.
Note: Enabling saveRowIdentity in grid options lead an error.
TypeError: grid.options.saveRowIdentity is not a function
Thanks in advance
Got it, thanks
$scope.rowEntitySave = function(rowEntity) { return rowEntity.field; }
// configurations saveRowIdentity: $scope.rowEntitySave,