This repository was archived by the owner on Sep 8, 2020. It is now read-only.
This repository was archived by the owner on Sep 8, 2020. It is now read-only.
ng-repeat-start and ng-repeat-end cause wonky behaviour in indexes #64
Open
Description
Using ng-repeat start and ng-repeat-end to repeat say, two TR-elements inside a table, and then using sorting on that tbody-element, causes the index that ui-sortable uses to be doubled.
So inside the callbacks.stop() function, where ui.item.sortable.dropindex is checked, it reports a value that is double the real value. And for every TR element added, this value is multiplied.
I have something like this:
<tbody ui-sortable="sortableOptions" ng-model="test">
<tr ng-repeat-start="result in test">
<td ng-bind="name"></td>
</tr>
<tr ng-repeat-end>
<td ng-bind="name"></td>
</tr>
</tbody>
And, dragging and dropping those tbody-elements cause the sorting to fail, because the index is wrong.