NGX infinite scroll with percentage height not showing

In an Angular 4 project, I don't have a scrollbar that appears on the screen.

When I use absolute size, for example height: 70rem, it works great, just not suitable for my application, in which the list is resized.

Here is my code:

<div class="row" style="height: 90%; overflow-y:scroll"
  infiniteScroll [infiniteScrollDistance]="2"  [scrollWindow]=false 
  [infiniteScrollThrottle]="500" (scrolled)="onScroll()">
  <div *ngFor="let server of servers">
    <span> {{ server }} </span>
  </div>
</div>
+4
source share
1 answer

instead of "height: 90%" use "height: 90vh". it may be work.

0
source

Source: https://habr.com/ru/post/1684796/


All Articles