-
Notifications
You must be signed in to change notification settings - Fork 226
Open
Description
Since vs-repeat uses new trimmed collection it is impossible to use $index to refer element in original collection.
This problem can be solved by adding index inside the elements of original collection. For example, by adding this into refresh() function after originalLength = originalCollection.length;:
for (var _originalIndex = 0; _originalIndex < originalLength; _originalIndex++) {
originalCollection[_originalIndex]._originalIndex = _originalIndex;
}and then use it like this:
<div class="list-group" style="max-height: 80vh; overflow-y: auto;" vs-repeat>
<div ng-repeat="group in $ctrl.coding.itemGroups track by group._originalIndex">
...
</div>
</div>kerryj89
Metadata
Metadata
Assignees
Labels
No labels