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

VirtualScroll not working with nested objects #6137

Closed
nickgal opened this issue Apr 12, 2016 · 11 comments
Closed

VirtualScroll not working with nested objects #6137

nickgal opened this issue Apr 12, 2016 · 11 comments
Assignees
Milestone

Comments

@nickgal
Copy link

nickgal commented Apr 12, 2016

Short description of the problem:

Exception when using nested objects with virtual scroll.

What behavior are you expecting?

Access to nested properties.

Steps to reproduce:

  1. Create virtual scroll with an array of nested objects
  2. Try to scroll past the initial items
// example nested object
{ 
  title: 'Title', 
  author: { 
    name: 'Name'
  }
}

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

angular2.dev.js:23877 TypeError: Cannot read property 'name' of undefined
    at AbstractChangeDetector.ChangeDetector_HomePage_2.detectChangesInRecordsInternal (viewFactory_HomePage:246)
    at AbstractChangeDetector.detectChangesInRecords (angular2.dev.js:9609)
    at AbstractChangeDetector.runDetectChanges (angular2.dev.js:9592)
    at AbstractChangeDetector._detectChangesContentChildren (angular2.dev.js:9665)
    at AbstractChangeDetector.runDetectChanges (angular2.dev.js:9593)
    at AbstractChangeDetector.detectChanges (angular2.dev.js:9581)
    at ChangeDetectorRef_.detectChanges (angular2.dev.js:5252)
    at VirtualScroll.renderVirtual (ionic.system.js:25046)
    at ionic.system.js:25026
    at readDimensions (ionic.system.js:25009)

Which Ionic Version? 1.x or 2.x
2 beta 4

Plunker that shows an example of your issue

http://plnkr.co/edit/JLlwIn3a1Ws8wavbX2Gj?p=preview

Run ionic info from terminal/cmd prompt: (paste output below)

Cordova CLI: 6.1.1
Ionic Framework Version: 2.0.0-beta.4
Ionic CLI Version: 2.0.0-beta.24
Ionic App Lib Version: 2.0.0-beta.14
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Mac OS X El Capitan
Node Version: v5.10.0
Xcode version: Xcode 7.3 Build version 7D175
@galvanu
Copy link

galvanu commented May 1, 2016

Happens also even if the viewModel contains only primitives and the view (html) contains binding to a method of the view mode.
For example:

<ion-list [virtualScroll]="items">

  <ion-item *virtualItem="#item">
      {{item.getTitle()}}
  </ion-item>

</ion-list>

@jgw96
Copy link
Contributor

jgw96 commented May 2, 2016

@galvanu Are you using Ionic 2 beta.6?

@galvanu
Copy link

galvanu commented May 2, 2016

Yeah, this is my ionic info output:
Cordova CLI: 6.1.0
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.6
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
ios-deploy version: Not installed
ios-sim version: 5.0.6
OS: Mac OS X Yosemite
Node Version: v4.3.1
Xcode version: Xcode 7.2.1 Build version 7C1002

@guillenotfound
Copy link
Contributor

Same here on beta.6:

Your system information:

Cordova CLI: 6.1.1
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.6
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
ios-deploy version: 1.8.6
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v4.3.0
Xcode version: Xcode 7.3 Build version 7D175

@ghenry22
Copy link

ghenry22 commented Jun 1, 2016

This may be related this other ticket around performance issues with virtualScroll #6104 . These issues still persist exactly the same in beta7. Virtualscroll is basically unusable on iOS currently for me.

@Nelrann
Copy link

Nelrann commented Jun 7, 2016

+1

@adamdbradley
Copy link
Contributor

Thanks for the report, it should be fixed in the next release. Thanks

@elineopsommer
Copy link

@adamdbradley this is still an issue see #6974

@FrancescoMussi
Copy link

Guuys it seems it doesn't yet work properly

@mikethm
Copy link

mikethm commented Aug 12, 2017

+1 ionic 3.6.0

@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