Friday 15 May 2015

ember.js - Ember observer fires on array controller when it shouldn't -



ember.js - Ember observer fires on array controller when it shouldn't -

update

here's bin of problem: http://emberjs.jsbin.com/ruwet/8/edit?html,js,console,output4

i have simple filtered property on array controller:

import ember 'ember'; export default ember.arraycontroller.extend({ activeencodes: function() { homecoming this.filterby('model', 'isactive'); }.property('model.@each.isactive'); });

i'm connected websocket , updating encodes in store

store.store.push('encode', data);

even though it's updating property on info (progress), activeencodes beingness recalculated. causing visual jank in templates.

if utilize model.@each.id, doesn't recalculate, other property seems trigger cp recalculate (even if property not changing).

any thought why happening?

when force causes entire model invalidate. considered new model fires observers watching on model (since sees new model). it's tangentially related ember info model reload causes item in {{each}} removed/inserted - losing current state well.

id special case, believe lives outside of scope of underlying properties on model (same reason don't define id on model). i'm guessing on though.

ember.js

No comments:

Post a Comment