CirclonGroup / angular-tree-component

A simple yet powerful tree component for Angular (>=2)
https://angular2-tree.readme.io/docs
MIT License
1.1k stars 492 forks source link

Update tree-node-collection.component.ts #773

Closed mtalis closed 4 years ago

mtalis commented 5 years ago

There is a very specific situation when I have multiple expanded large trees and getting the error when remove one of them: "[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: 'Reaction[t.detectChanges()] TypeError: Cannot read property 'position' of null" Actually the error occurs in the marginTop method of TreeNodeCollectionComponent. Adding the check for this.viewportNodes[0].parent fixes it.

adamkleingit commented 4 years ago

Thanks! This was already fixed on master. Closing