Closed dmalisani closed 8 years ago
Change the template. Something similar to inside <li ng-repeat
<label> <input ng-click=\"checkChanged(row)\" type=\"checkbox\" ng-model=\"row.isSelected\">{{ row.label }}</label>
yes.. I already tried it but this method it shows in each row, not only in children ---template (partial)----
<td ng-repeat="col in colDefinitions">
<div ng-if="col.cellTemplate" compile="col.cellTemplate"></div>
<div ng-if="!col.cellTemplate">{{row.branch[col.field]}}</div>
<input ng-click="checkChanged(row)" type="checkbox" ng-model="row.isSelected"></label>
</td>
use ng-if in input tag when row.children is null
it works (with row.branch). Thanks a lot!
Can you share the changes you made for this? This will help others for similar use case. Some plunker will be awesome
The pertinent part in my template is:
<td ng-repeat="col in colDefinitions">
<div ng-if="col.cellTemplate" compile="col.cellTemplate"></div>
<div ng-if="!col.cellTemplate">{{row.branch[col.field]}}</div>
<input ng-if="!row.branch.children.length" ng-click="checkChanged(row)" type="checkbox" ng-model="row.isSelected"></label>
</td>
I need add a checkbox and others widget (buttons, etc) but it should appears only when the branch is expanded. This mean, It must be visible only for each children item. How I can do it?