In my actual scenario I am trying to move one Array element to another position in the Array.
To do so I remove the element from the old position and add it to the new position:
this.get('myArray').removeObject(element);
this.get('myArray').insertAt(newIndex, element);
The problem is that when the removeObject
change propagates to the rest of my code a lot of side effects are happening because the missing element.
I would like to make both manipulations at once and notify the changes after the modifications have been finished.
PS: please don’t get attach to the actual example, I am not looking for workarounds for this case but a general solution for element manipulations in a batch.