Ionic list reorder bug? Problem?


I’m not sure if this is a bug or just me understanding how lists work in Ionic really badly…

It’s a fork of List: Nightly, but I’ve changed the list items to be inputs and added “track by $index” to to the item ng-repeat so there can be the same values in two items. If you just click ‘reorder’ and drag things around then it works fine. However, if you change one of the item values in its text box and then click ‘reorder’ and drag it the item is left where it is and an item with the previous value is moved in to the list.

I could change the array to be an array of objects with proper ids and track by that, which would work around the problem, but I can’t quite understand why track by $index doesn’t do what I’m expecting.