I have following structure parent can have multiple children and children will have an objective. I need to show this in editable table, but when I bind the model within the input of objective, it updates all other selected children's objective too.
here is code
select same childrens from two row's options, and edit the objective of one children it will reflect in other row as well.
<tbody>
<tr ng-repeat-start="parent in records" ng-class-even="'striped'">
<!--KPI-->
<td><strong>{{parent.name}}</strong></td>
<!-- controls -->
<td tool-tips class="inputs">
<select
ng-model="parent.childrens"
ng-options="item as item.name for item in controlTypes"
multiple='multiple'>
</select>
</td>
<!-- Controls objective-->
<td colspan="1"/>
</td>
</tr>
<tr ng-if="parent.childrens.length>0"
ng-repeat="child in parent.childrens">
<td name="process" colspan="2" style="word-wrap:break-all;" align="right">{{child.name}}
</td>
<!-- Controls objective-->
<td>
<input type="text" class="ultra-short" ng-model="child.objective"
maxlength="200"/>
</td>
</tr>
<tr ng-repeat-end></tr>
</tbody>
Any help please.