Skip to content
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

ionic 3 error virtual scroll #11093

Closed
gbelmm opened this issue Apr 6, 2017 · 14 comments
Closed

ionic 3 error virtual scroll #11093

gbelmm opened this issue Apr 6, 2017 · 14 comments
Assignees

Comments

@gbelmm
Copy link

gbelmm commented Apr 6, 2017

captura de pantalla 2017-04-06 a las 12 04 07

captura de pantalla 2017-04-06 a las 12 06 47

simple code

captura de pantalla 2017-04-06 a las 12 04 51

@manucorporat manucorporat self-assigned this Apr 6, 2017
manucorporat added a commit that referenced this issue Apr 6, 2017
@manucorporat
Copy link
Contributor

Looks like there is an issue when the number of items is == 0.

Fixed and added new tests: 5e142a0

@szerner
Copy link

szerner commented Apr 6, 2017

@manucorporat : yes, I have these crashes too when the lists gets empty through filter operations.

@manucorporat
Copy link
Contributor

@szerner @gbelmm could you guys try this new nightly release?
ionic-angular@3.0.0-201704061529

@gbelmm
Copy link
Author

gbelmm commented Apr 6, 2017

it works

@szerner
Copy link

szerner commented Apr 6, 2017

Hm, now I get a bunch of Typescript Errors when I try to "ionic serve":

[17:33:59]  ionic-app-scripts 1.3.0
[17:33:59]  watch started ...
[17:33:59]  build dev started ...
[17:33:59]  clean started ...
[17:33:59]  clean finished in 4 ms
[17:33:59]  copy started ...
[17:33:59]  transpile started ...
[17:34:04]  typescript: ...te/proj/node_modules/ionic-angular/components/slides/slides.d.ts, line: 568
            Cannot find name 'SlideElement'.

     L567:  /** @hidden */
     L568:  clickedSlide: SlideElement;
[17:34:04]  typescript: ...te/proj/node_modules/ionic-angular/components/slides/slides.d.ts, line: 570
     L569:  /** @hidden */

            Cannot find name 'SlideContainer'.

and some more.

@szerner
Copy link

szerner commented Apr 6, 2017

I reverted back to ionic-angular@3.0.0 for now and my app builds again.

manucorporat added a commit that referenced this issue Apr 6, 2017
@dtalay
Copy link

dtalay commented Apr 10, 2017

Still having issues on this.
Also having this warning message:

Virtual Scroll: Please provide an "approxItemHeight" input to ensure proper virtual scroll rendering
virtual-util.js:24 Uncaught TypeError: Cannot read property 'length' of undefined

screenshot from 2017-04-10 11-58-23

@dtalay
Copy link

dtalay commented Apr 10, 2017

I had it surrounded with an *ngIf so that it would only show if there's an item in the array but it doesn't show. It says: Virtual Scroll: Please provide an "approxItemHeight" input to ensure proper virtual scroll rendering

@ealmiladi
Copy link

@m00g33k having the same issue with the undefined records

@amrsh
Copy link

amrsh commented Apr 24, 2017

After I updated to 3.0.1 I still got property 'top' error, but found that this was due to my list being undefined, not empty (which it was upon load even though initialized to an empty array in a separate service). In case helpful to others, this worked for me:

<ion-list [virtualScroll]="list.length ? list : []">

@HashmatWaziri
Copy link

@amrsh , you are right the list needs to be defined for example :

# IONIC 3
home.html

<ion-list [virtualScroll]="results" [approxItemHeight]="'132px'">
<ion-item *virtualItem="let result;let i=index" >
<h2 ion-text left> {{ i+1}} &nbsp; {{ result.title}}</h2>
<p>{{result.ReleaseDate}} </p>
<ion-icon item-right></ion-icon>
<ion-icon (click)="download(result.audio, result.file_name)" item-right name="download" >
</ion-icon>
<ion-icon item-right (click)="open(result.file_name)" name="play"></ion-icon>
</ion-item>
</ion-list>

home.ts

export class HomePage {
constructor(public navCtrl: NavController) {
this.results = [];
this._unfilteredResults = [];
this._usesFilter = false;
}
......
'}'

@Douglasfeuser
Copy link

still getting this error, is there any fix or workaround for this? i'm using version 3.1.2.

@bumble-bee-chuna
Copy link

Seconding what @Douglasfeuser said

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 2, 2018

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 Sep 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants