I implemented infinite scroll with ngx-infinite-scroll. When the user reaches the bottom of the scrollable element (with a fixed height), the event 'scrolled' will trigger and call an API to load more items into this element.
The problem is, when I display more data, the scroll level is automatically changed and the event will trigger again. I just want this event to be manually triggered by the user. Is there a way to block to scroll level when I load more data?
<div
class="project-feed-container"
infiniteScroll
[infiniteScrollDistance]="2"
[infiniteScrollThrottle]="50"
[alwaysCallback]="true"
[scrollWindow]="false"
(scrolled)="onScroll()"
>
<!-- *ngFor with content -->
</div>