Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70434

Ionic5 ion-virtual-scroll custom components

$
0
0

@gonself wrote:

Hi!
I’m using ion-virtual-scroll to render a 50 items lists, but inside each item i used a custom component, like this:

<ion-virtual-scroll [items]="items" approxItemHeight="65px">
	<ion-item *virtualItem="let item">
		<app-avatar [info]="item"></app-avatar>
		<ion-label>
			<h2><span>{{item.text}}</h2>
		</ion-label>
	</ion-item>
</ion-virtual-scroll>

my custom component app-avatar has an ngOnInit function, but it only execute the first 22 times (i supose it depend of resolution), the rest of the items has invalid info…

¿What i’m doing worng?

If i use ion-list instead infinite-scroll all its ok

Thanks in advanced…

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70434

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>