ngx-virtual-scroller
ngx-virtual-scroller copied to clipboard
[Angular 5.2.x] - Page get stucked with ngx-virtual-scroller
Hello,
I recently installed ngx-virtual-scroller for my Angular: 5.2.5
project to use, but when I route to the component (page) which contains ngx-virtual-scroller it stuck and all the page get blocked until I close the hole Brows Tab
Here is the chunk of code i used inside the view: (the parent is scrollable)
<div #scrolledContainer class="shared-table-scrolled-content">
<div class="shared-table-rows">
<!-- Data Rows -->
<virtual-scroller #scroll [items]="rows" [parentScroll]="scrolledContainer">
<div class="shared-table-row"
*ngFor='let row of scroll.viewPortItems; let i = index, let last = last; trackBy: trackByFnInpt.trackByFn'
[class.last-row]="last"
>
<ng-container *ngTemplateOutlet="rowsContentRef;context: {rows: rows, row: row, i: i}"></ng-container>
</div>
</virtual-scroller>
<div class="shared-table-row empty-table" *ngIf="!rows || !rows.length">
No records found.
</div>
</div>
</div>
the installed version of ngx-virtual-scroller is [email protected]
Angular 5 is nearly 5 years old. This project has a peer dependency of Angular 6 or higher. I suggest you update Angular and see if that helps.
@floogulinc thank you for your reply, Actually, we can not upgrade the angular version of the current projet because we will face a very big and difficult amount of changes to handle to the hole app. That's why I'm searching for an alternative solution to this problem.