bug: ion card flickering and data is incorrect while in infinite scroll
See original GitHub issueBug Report
Ionic version: [x] Angular 4.3.1
Current behavior:
-
When cards are in an infinite scroll, all cards in the view have corders flicker from rounded to square.
-
Within an ion card, I have observables with async pipe that are presenting the wrong information for the given card. They show data from another card previously shown in the list.
Expected behavior: Cards shouldn’t flicker.
Data shown should match the respective item.
Steps to reproduce:
Cards in the custom component have the following subscriptions within them.
<!-- <ion-card> ..... <ion-card-header *ngIf="let profile of profile$ | async"> ... -->
Related code:
<ion-virtual-scroll
[items]="infinite$ | async"
[itemHeight]="itemHeight"
[trackBy]="trackByIdx"
>
<div *virtualItem="let d">
<!-- i.e. <ion-card> ..... <ion-card-header *ngIf="let profile of profile$ | async"> ... -->
<!-- nonetheless some custom component. here I propagate out to the parent component/page -->
<ng-container *ngTemplateOutlet="child; context: { doc: d }"></ng-container>
</div>
</ion-virtual-scroll>
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:6 (1 by maintainers)
Top Results From Across the Web
ion card flickering and data is incorrect while in infinite scroll ...
Current behavior: When cards are in an infinite scroll, all cards in the view have corders flicker from rounded to square. Within an...
Read more >Ionic virtual scroll list elements always blink when data set ...
I solved this issue by iterating over the rows, and pushing them one by one to the array. // WRONG WAY will CAUSE...
Read more >ion-infinite-scroll Action Component - Ionic Framework
The ion-infinite-scroll component calls an action to be performed when the user scrolls a specified distance from the bottom or top of the...
Read more >ion-refresher causing fixed elements to scroll - You.com
Current behavior: The refresher trigger's it's "ionRefresh" method when pulling up (scrolling down). This issue occurs only after first attempt at normal pull ......
Read more >sitemap-forums2.xml - Syncfusion
... https://www.syncfusion.com/forums/141636/error-showing-when-dragging-card-out ... /need-run-time-scroll-infinite-scroll-option-in-grid-treegrid-controls ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Having same issue with ion-virtual-scroll…it just wont stop flickering or stuttering
EDIT: found that using ion-card was the issue, as it was very buggy and kept flickering and moving farther down the viewport then expected. I switched to using ion-item and my problems were solved.
<ion-virtual-scroll [items]="searchableList"> <ion-item *virtualItem="let item" lines="none" (click)="buttonClick(item)" class="ion-item-border"> <ion-label text-wrap text-center class="card-title"> {{item.name}} </ion-label> </ion-item> </ion-virtual-scroll>
you can also just create your own CSS variables to make it look like a cardThanks for the issue! This issue is being closed due to inactivity. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Thank you for using Ionic!