ember-render-modifiers icon indicating copy to clipboard operation
ember-render-modifiers copied to clipboard

did-insert not triggering re-render for tracked changes

Open patricklx opened this issue 5 years ago • 4 comments

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 ?

patricklx avatar Feb 18 '20 08:02 patricklx

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

btecu avatar Feb 26 '20 19:02 btecu

Perhaps you want did-update?

btecu avatar Feb 26 '20 19:02 btecu

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

patricklx avatar Feb 27 '20 07:02 patricklx

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...

rwjblue avatar Mar 29 '20 15:03 rwjblue