Skip to content

Virtual scroll not completing with custom components #17298

Closed

Description

@Ross-Rawlins

Bug Report

Ionic version:
[x] 4.x

Current behavior:
When implementing virtual scroll with any content in the containing tag the page renders on start up. As soon as the only thing inside the container is the custom component it stays on the init process, the elements are given the correct positions but the class virtual loading is still appended to the element. This only gets removed when I scroll on the page and then the content shows.

Expected behavior:
The class virtual-loading show should be removed

Steps to reproduce:
Implement virtual scroll with a custom component inside of it.

Related code:
This renders

 <ion-virtual-scroll #virtualScroll [items]="eventsList"   approxItemHeight="400px">
        <div *virtualItem="let item" class="event-item">
1
            <app-events-list-item [event]="item" ></app-events-list-item>
        </div>
    </ion-virtual-scroll>

This does not

 <ion-virtual-scroll #virtualScroll [items]="eventsList"   approxItemHeight="400px">
        <div *virtualItem="let item" class="event-item">
            <app-events-list-item [event]="item" ></app-events-list-item>
        </div>
    </ion-virtual-scroll>

Other information:

Ionic info:

Ionic:

   ionic (Ionic CLI)             : 4.6.0 (/Users/rossrawlins/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.0.0
   @angular-devkit/build-angular : 0.12.3
   @angular-devkit/schematics    : 7.1.4
   @angular/cli                  : 7.1.4
   @ionic/angular-toolkit        : 1.2.2

System:

   NodeJS : v8.9.4 (/usr/local/bin/node)
   npm    : 6.6.0
   OS     : macOS Mojave

Activity

  1. Ross-Rawlins commented on Jan 29, 2019

    @Ross-Rawlins
    Author

    After further investigation to seems to only happen when I am setting the height of the custom component.

  2. Ross-Rawlins commented on Jan 29, 2019

    @Ross-Rawlins
    Author

    This issue with the class seems to also happen when you change the list.

  3. brandyscarney commented on Mar 26, 2019

    @brandyscarney
    Member

    Thanks for the issue! This should be fixed in the ionic 4.2.0-dev.201903262032.a8a48a4 dev release. Could you please try this and let us know if it isn't fixed?

  4. ionitron-bot commented on Apr 25, 2019

    @ionitron-bot

    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.

  5. locked and limited conversation to collaborators on Apr 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions