This repository was archived by the owner on Oct 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
check interaction with render modifiers #203
Copy link
Copy link
Open
Labels
help wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested
Description
// background - emberjs/ember.js#18698 (comment)
https://github.com/lifeart/ember-ref-modifier/blob/master/tests/dummy/app/components/glimmer-ref.js
since we setting property in next runloop, such code may fail
<div {{ref this "menuElement"}} {{did-insert this.focusOnFirstItem}} >in other side, callback may solve issue
<div {{ref this.setMenuElement}} >
<div {{did-insert this.setMenuElement}} >@action
setMenuElement(node) {
this.menuElement = node;
this.focusOnFirstItem(node);
}in other way, we can make next runloop sheduling optional, or remove it at all from modifier itself and give control to developers.
{{ref this "prop"}} - for classic usage
{{ref this "prop" run="next"}} - for runloop control
{{ref this.setElement run="next"}} - runloop controlled callback
{{ref (next-runloop this.setElement)}} - manual callback controlother way - allow tracked chain computations rerun in same transaction if some of tracked properties is DOM node, but it seems low-level change.
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requested