Whenever I click on a particular value, I want to be able to edit only that specific value. However, the issue is that when I try to do so, it ends up editing all the values in that row instead of just the one I clicked on. Here is the code snippet:
<table>
<tbody ng-repeat="(key,value) in row.entity.subData"><tr ng-repeat="item in value" >
<td >
<span ng-hide="row.entity.editing(item)" ng-click="row.entity.editItem(item)">{{item}}</span>
<button ng-show="row.entity.editing(item)">save</button>
</td>
</tr></tbody></table>
In my JavaScript code, I have the following function:
row.entity.editItem = function (item) {
row.entity.editing=function (item) {
return true;
}
}
The problem is that clicking on any value turns all values into buttons, not just the one that was clicked.