Skip to content

bug: ion-virtual-scroll is overlapping on slow network connection #20342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mrSingh007 opened this issue Jan 30, 2020 · 6 comments
Closed

bug: ion-virtual-scroll is overlapping on slow network connection #20342

mrSingh007 opened this issue Jan 30, 2020 · 6 comments
Labels

Comments

@mrSingh007
Copy link

mrSingh007 commented Jan 30, 2020

ion-virtual-scroll not rendering data correctly on slow network.
I tested with 3g network on chrome and the ion-virtual-scroll items gets overlapped.

This bug is related to #18409 but I created this ticket as this bug appears always on slow network.

e.g
home.page.html looks like

<ion-header>
  <ion-toolbar color="primary">
     Lorem
  </ion-toolbar>
</ion-header>
<ion-content *ngIf="(obser$| async) as testArray">
  <ion-virtual-scroll [items]="testArray" approxItemHeight="320px">
    <div *virtualItem="let item;">
    <app-demo [personTile]="item" ></app-demo>
    </div>
  </ion-virtual-scroll>
</ion-content>

and home.page.ts

export class HomePage {
  obser$: Obserable<Person[]>;
  constructor(private service: LoremService) {
    this.obser$ = this.service.getAllPersons();
  }

and app.demo.ts

export class AppDemoComponent {
  @Input()
  personTile: Person;

and app.demo.html

<ion-card>
 <ion-card-content>
    <ion-grid>
      <ion-row>
        <ion-col>
          {{personTile.name}}
        </ion-col>
          ....
       </ion-row>
    </ion-grid>
  </ion-card-content>
</ion-card>

Ionic version:
ionic cli : 5.4.15
"@angular/router": "~8.1.2",
"@capacitor/android": "^1.4.0",
"@capacitor/core": "1.4.0",
"@ionic-native/core": "^5.20.0",
"@ionic-native/splash-screen": "^5.20.0",
"@ionic-native/status-bar": "^5.20.0",
"@ionic/angular": "^4.11.10",

@ionitron-bot ionitron-bot bot added the triage label Jan 30, 2020
@liamdebeasi
Copy link
Contributor

Thanks for the issue. Can you try this again on the latest version of Ionic Framework? If the issue still happens there, can you provide a repo with the code required to reproduce this issue?

@liamdebeasi liamdebeasi added the needs: reply the issue needs a response from the user label Jan 30, 2020
@ionitron-bot ionitron-bot bot removed the triage label Jan 30, 2020
@mrSingh007
Copy link
Author

ok. I am creating stackblitz and will share soon

@ionitron-bot ionitron-bot bot added triage and removed needs: reply the issue needs a response from the user labels Jan 30, 2020
@liamdebeasi liamdebeasi added the needs: reply the issue needs a response from the user label Jan 30, 2020
@ionitron-bot ionitron-bot bot removed the triage label Jan 30, 2020
@mrSingh007
Copy link
Author

@liamdebeasi
I have tested with latest version and problem is still there. I have added info to the bug.
(I am not able to provide live code example as on stackblitz ion-content is not showing texts https://stackblitz.com/edit/ionic-v4-rdzrx3 but same code example can be taken)

@ionitron-bot ionitron-bot bot added triage and removed needs: reply the issue needs a response from the user labels Jan 30, 2020
@mrSingh007
Copy link
Author

I have found out anything after 'ion-virtual-scroll' tag won't render on slow network. Even normal Lorem text. (its displayed for a second and then goes away)

@liamdebeasi
Copy link
Contributor

Thanks for the issue. I am going to close this as a duplicate of #18409. I was able to reproduce the issue regardless of network connection speed. ion-virtual-scroll does not make any network requests by default, so it may just be a matter of lazy loaded scripts loading in slowly.

@ionitron-bot
Copy link

ionitron-bot bot commented Apr 1, 2020

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. 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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Apr 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants