orizens / ngx-infinite-scroll

Infinite Scroll Directive for Angular
https://www.npmjs.com/package/ngx-infinite-scroll
MIT License
1.25k stars 224 forks source link

changes to accessibility on destroyScroller and setup #443

Open curtiskeller opened 1 month ago

curtiskeller commented 1 month ago

Hi,

We were using the destroyScroller and setup methods to reset the scroller based on external factors. Is there a new method to call to reset the scroller in a similar manner?

@ViewChild('scrollerRef', { static: true, read: InfiniteScrollDirective }) private _infiniteScrollDirective!: InfiniteScrollDirective;

  private resetScroller() {
    this._infiniteScrollDirective.destroyScroller();
    this._infiniteScrollDirective.setup();
    this._scrollerRefEl.nativeElement.scrollTop = 0;
  }

Thanks