question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: ion card flickering and data is incorrect while in infinite scroll

See original GitHub issue

Bug Report

Ionic version: [x] Angular 4.3.1

Current behavior:

  1. When cards are in an infinite scroll, all cards in the view have corders flicker from rounded to square.

  2. 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:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
narhc8commented, Jun 2, 2019

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 card

0reactions
ionitron-bot[bot]commented, Sep 18, 2020

Thanks 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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found