angular-tree-component icon indicating copy to clipboard operation
angular-tree-component copied to clipboard

virtualScroll sometimes is completely blank / empty

Open philipphutterer opened this issue 6 years ago • 6 comments
trafficstars

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

philipphutterer avatar Mar 26 '19 18:03 philipphutterer

same here, When scrolling, the content become to empty for a while Screenshot-2020-11-13-at-11-24-47

vincent-cm avatar Nov 13 '20 11:11 vincent-cm

The problem still exists(

EA-EKB avatar Jul 21 '21 13:07 EA-EKB

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.

vinodsantharam avatar Feb 17 '22 21:02 vinodsantharam

Same here.

Kexplx avatar Jul 01 '22 08:07 Kexplx