angular-tree-component
angular-tree-component copied to clipboard
virtualScroll sometimes is completely blank / empty
Sometimes the tree is completely empty when virtualScroll is activated. After some debugging i found out that renderedNodesMaxLength in tree-virtual-scroll.model.ts is not an integer but a float. This buggy behaviour did not occur anymore after ceiling renderedNodesMaxLength. Maybe because of some strange combinations of nodeHeight and treeHeight this value will not be an integer and the test some lines later fails. What was the actual thought behind this check?
Regards
same here,
When scrolling, the content become to empty for a while

The problem still exists(
We had the same issue. We did this trick and it works well (even the node.scrollToView() works perfectly after):
<div class="tree-view-container" *ngIf="items.length > 0"> <!-- the trick is to wrap and hide with ngIf -->
<tree-root
[nodes]="items"
[options]="options"
>
...
</tree-root>
</div>
We load the data asynchronously and before fetching the API we worked with mocked data. There weren't absolutely no issues. Problems came just after calling the API.
Hopefully, that will help you guys.
Same here.