virtual-scroll with table row - ionic 4 RC01
See original GitHub issueBug Report
Ionic version: [x] 4.x
Current behavior: Virtual Scroll throws an error “TypeError: Cannot read property ‘context’ of undefined” and does not render anything when trying to repeat table rows and data
Expected behavior: Virtual scroll renders list of objects performantly.
Steps to reproduce:
In a page create an array of objects
testArray = [{name:“test1”}, {name:“test2”}, {name:“test3”}]
In the template , populate a row with the following template
<ion-virtual-scroll [items]="testArray">
<tr *virtualItem="let item">
<td>{{item.name}}</td>
</tr>
</ion-virtual-scroll>
If we replace tr tags with ion-item the error disappears and it renders the elements in the DOM but the elements are not visible.
Other information:
Ionic info:
Ionic:
ionic (Ionic CLI) : 4.6.0
Ionic Framework : @ionic/angular 4.0.0-rc.1
@angular-devkit/build-angular : 0.11.4
@angular-devkit/schematics : 7.1.4
@angular/cli : 7.1.4
@ionic/angular-toolkit : 1.2.2
System:
NodeJS : v10.15.0
npm : 6.5.0
OS : Windows 7
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:14 (1 by maintainers)
Top Results From Across the Web
virtual-scroll with table row - ionic 4 RC01 · Issue #17095
Expected behavior: Virtual scroll renders list of objects performantly. ... If we replace tr tags with ion-item the error disappears and it ...
Read more >ion-virtual-scroll
Virtual Scroll displays a virtual, "infinite" list. An array of records is passed to the virtual scroll containing the data to create templates...
Read more >Ionic 4 Columns with ion-virtual-scroll not working
It won't work with Virtual Scroll. Virtual Scroll was made to render just the items visible on screen, so, virtual items should have ......
Read more >Making an Angular Material data table rows scroll while ...
Coding example for the question Making an Angular Material data table rows scroll while maintaining a sticky a header-angular.js.
Read more >Faster List Performance with Ionic 4 Virtual Scroll & Infinite Scroll
In this tutorial we increase our Ionic 4 list performance with the virtual scroll and infinite scroll component! Learn to build mobile apps ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have the same issue with a virtual scroll containing an ion-item-sliding, same stack trace.
Here is the full error text
TypeError: Cannot read property ‘context’ of undefined at fesm5.js:3778 at ZoneDelegate.push…/node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:391) at Object.onInvoke (core.js:16156) at ZoneDelegate.push…/node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:390) at Zone.push…/node_modules/zone.js/dist/zone.js.Zone.run (zone.js:150) at NgZone.push…/node_modules/@angular/core/fesm5/core.js.NgZone.run (core.js:16070) at IonVirtualScroll.push…/node_modules/@ionic/angular/dist/fesm5.js.IonVirtualScroll.nodeRender (fesm5.js:3767) at doRender (ffukzwt6.entry.js:1) at t.writeVS (ffukzwt6.entry.js:1) at p (ionic.core.js:9)