call template callbacks in Deps.nonreactive

This commit is contained in:
David Greenspan
2013-10-08 19:03:09 -07:00
parent d1e6bd1a4f
commit 11aa6c65e2
2 changed files with 12 additions and 6 deletions

View File

@@ -1226,8 +1226,10 @@ UI.Component.parented = function () {
// XXX think about this callback's timing
if (self.rendered) {
updateTemplateInstance(self);
self.rendered.call(self.templateInstance);
Deps.nonreactive(function () {
updateTemplateInstance(self);
self.rendered.call(self.templateInstance);
});
}
};
@@ -1236,8 +1238,10 @@ UI.Component.removed = function () {
var self = this;
self.isDestroyed = true;
if (self.destroyed) {
updateTemplateInstance(self);
self.destroyed.call(self.templateInstance);
Deps.nonreactive(function () {
updateTemplateInstance(self);
self.destroyed.call(self.templateInstance);
});
}
};

View File

@@ -64,8 +64,10 @@ UI.render = function (kind, props, parentComp) {
comp.init();
if (comp.created) {
updateTemplateInstance(comp);
comp.created.call(comp.templateInstance);
Deps.nonreactive(function () {
updateTemplateInstance(comp);
comp.created.call(comp.templateInstance);
});
}
var range = new DomRange(comp);