Skip to content

[Angular 5.2.x] - Page get stucked with ngx-virtual-scroller #536

@sohaieb

Description

@sohaieb

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 ngx-virtual-scroller@4.0.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions