Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introducing an insertBefore method on Templatize instances #4492

Closed
wants to merge 3 commits into from

Conversation

sorvell
Copy link
Contributor

@sorvell sorvell commented Apr 4, 2017

Fixes #4447. This api should be used to insert instances into the dom. Using it ensures that sub elements are "readied" before host elements.

…nstances. This api should be used to insert instances into the dom.
@@ -580,7 +580,7 @@
}
let beforeRow = this.__instances[instIdx + 1];
let beforeNode = beforeRow ? beforeRow.children[0] : this;
this.parentNode.insertBefore(inst.root, beforeNode);
inst.insertBefore(this.parentNode, this);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be inst.insertBefore(this.parentNode, beforeNode); (which will also solve your eslint error!!)

Steven Orvell added 2 commits April 4, 2017 10:58
…ore`).

Templatize instances now more efficiently propagate changes to clients.
@sorvell
Copy link
Contributor Author

sorvell commented Apr 6, 2017

Closing this PR since a better fix for the behavior that does not introduce new API is in the works.

@sorvell sorvell closed this Apr 6, 2017
@sorvell sorvell deleted the fix-4447 branch April 6, 2017 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants