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.
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.