angular-ui-tree: Inconsistent behavior with ng-repeats using "track by $index"

Hi there,

I’ve run into an issue relating to the construction of my lists. In my application I need to utilize track by (specifically track by $index) in my ng-repeats.

Results of the sort can be inconsistent and incorrect when the items listed were generated by ng-repeat utilizing “track by”

When a user sorts position 3 to position 1, the result will be position 2. Position 4 to position 1 will result in the final position being 4.

This applies to all items root level and nested.

It’s hard to nail down an exact case to reproduce, however, repeated sorting of multiple items eventually ends up more and more inconsistent as the steps increase.

I’ve updated demos/group.html in the fork below: beaec5a572fde6b96c3bff78897372dd41ff2272

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 17 (5 by maintainers)

Most upvoted comments

still have this issue in 2017!