emberjs / ember-render-modifiers

Implements did-insert / did-update / will-destroy modifiers for emberjs/rfcs#415
MIT License
86 stars 33 forks source link

did-insert not triggering re-render for tracked changes #20

Open patricklx opened 4 years ago

patricklx commented 4 years ago

e.g. in the example given in the code comments, the this.count is not updated in the template...

https://github.com/emberjs/ember-render-modifiers/blob/master/addon/modifiers/did-insert.js#L29

in the callstack i see that installModifier is called with a untrack context

probably because of this: https://github.com/emberjs/ember-render-modifiers/pull/16 ?

btecu commented 4 years ago

I believe did-insert is supposed to trigger when the element is inserted into the DOM.

btecu commented 4 years ago

Perhaps you want did-update?

patricklx commented 4 years ago

No, what i mean is that everything inside the did-insert callback is not in a tracking context. So, if a tracked property is updated in it, other parts tracking it will not know about the change

rwjblue commented 4 years ago

Can you describe the actual issue you are running into? did-insert is only called once (upon insertion) so I'm a bit confused about what is actually biting you...