I am using Angular Material Virtual scroll, the items get loaded correctly into the DOM, but while scrolling it happens that it jumps around and automatically jumps to the end.
<cdk-virtual-scroll-viewport #scrollViewport (scrolledIndexChange)="scrolled($event)" [itemSize]="ITEM_SIZE" class="my-virtual" >
<div *cdkVirtualFor="let elem of elemtArray;" class="input-field-container ">
<div class="my-style" >{{elem}} </div>
</div>
</cdk-virtual-scroll-viewport>
The output of the method scrolled is the following, if the glitch occurs:
Scrolled: 105
Scrolled: 115
Scrolled: 106
Scrolled: 117
Scrolled: 109
Scrolled: 119
Scrolled: 110
Scrolled: 121
If this happens, it automatically scrolls to the end of the virtual scroll.