@lucasrleandro wrote:
Hi, I am using virtual scroll in my Ionic 4 (angular).
It works fine, but an annoying behavior is happening:When I scroll down or up, the comming items have correct title but picture from other item, and takes half second to update. It is very noticeble and anoying, can someone help me? I want the item to appear on the screen with the correct picture. It does not happen when I use ion list, but I want to use Virtual Scroll for better performance
<ion-content> <ion-virtual-scroll [items]="products" approxItemHeight="215px"> <ion-card *virtualItem="let p; let itemBounds = bounds;"> <div> <ion-img [src]="p.imgUrl"></ion-img> </div> <ion-card-header> <ion-card-title>{{ p.title }}</ion-card-title> </ion-card-header> <ion-card-content>{{ p.price}}</ion-card-content> </ion-card> </ion-virtual-scroll> </ion-content>
Posts: 1
Participants: 1