Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4838

How to manipulate an Ember Object and only notify propagate changes when all modifications have been done

$
0
0

@fguillen wrote:

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.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4838

Trending Articles