Closed kevindqc closed 6 years ago
I have angular-tree-component which has these dependencies:
angular-tree-component
+-- angular-tree-component@6.0.0 | +-- mobx@3.4.0 | `-- mobx-angular@2.0.0
When I expand a node in my tree view, I see "detach" logs from the console.
Looking where it comes from, it points me to node_modules/mobx-angular/dist/directives/mobx-autorun.directive.js.
node_modules/mobx-angular/dist/directives/mobx-autorun.directive.js
The code inside:
MobxAutorunDirective.prototype.autoDetect = function (view) { if (!this.mobxAutorun || !this.mobxAutorun.dontDetach) { console.log('detach'); view.detach(); } var autorunName = view._view.component ? view._view.component.constructor.name + ".detectChanges()" // angular 4+ : view._view.parentView.context.constructor.name + ".detectChanges()"; // angular 2 this.dispose = autorun(autorunName, function () { return view['detectChanges'](); }); };
There's an extra block that logs and call to view.detach that isn't in the actual code on github
view.detach
Not sure where it comes from. Maybe the repository wasn't clean when it got published to NPM?
Thanks!
Fixed in 2.0.1 - the build wasn't updated. Thanks for investigating
I have
angular-tree-component
which has these dependencies:When I expand a node in my tree view, I see "detach" logs from the console.
Looking where it comes from, it points me to
node_modules/mobx-angular/dist/directives/mobx-autorun.directive.js
.The code inside:
There's an extra block that logs and call to
view.detach
that isn't in the actual code on githubNot sure where it comes from. Maybe the repository wasn't clean when it got published to NPM?
Thanks!