mercredi 22 avril 2015

How can I avoid scrolling to top of viewport when adding record using pushPayload?

I'm adding records coming in via pusher to the store using pushPayload.

actions: {
  upsertLoad: function(data) {
    this.store.pushPayload(data);
  }
}

When I add records this way, the browser window scrolls to the top of the viewport if the template for the controller is currently in view.

How can this be avoided? If I add records using createRecord the window does not scroll. I believe that the underlying problem is that the controller is resorting the array, but I'm not sure and haven't been able to stop the behavior.




Aucun commentaire:

Enregistrer un commentaire