Skip to content

Commit

Permalink
Issue #442 - Attempt at fixing Editing in 2.0.6
Browse files Browse the repository at this point in the history
-Removed the $eval on COL_FIELD placeholder
-Simplified ng-input to only be concerned with hiding keystrokes and
using ESC to backout edit
-Use ng-model in EditableCellTemplate to do actual binding
  • Loading branch information
c0bra committed May 28, 2013
1 parent f398692 commit 050a1ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/directives/ng-cell.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
return {
pre: function($scope, iElement) {
var html;
var cellTemplate = $scope.col.cellTemplate.replace(COL_FIELD, '$eval(\'row.entity.\' + col.field)');
var cellTemplate = $scope.col.cellTemplate.replace(COL_FIELD, 'row.entity.' + $scope.col.field);
if($scope.col.enableCellEdit){
html = $scope.col.cellEditTemplate;
html = html.replace(DISPLAY_CELL_TEMPLATE, cellTemplate);
html = html.replace(EDITABLE_CELL_TEMPLATE, $scope.col.editableCellTemplate.replace(COL_FIELD, '$eval(\'row.entity.\' + col.field)'));
html = html.replace(EDITABLE_CELL_TEMPLATE, $scope.col.editableCellTemplate.replace(COL_FIELD, 'row.entity.' + $scope.col.field));
} else {
html = cellTemplate;
}
Expand Down
2 changes: 1 addition & 1 deletion src/templates/editableCellTemplate.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<input ng-class="'colt' + col.index" ng-input="COL_FIELD" />
<input ng-class="'colt' + col.index" ng-input="COL_FIELD" ng-model="COL_FIELD" />

0 comments on commit 050a1ba

Please sign in to comment.