+import { fromEvent, Observable, Subscription } from 'rxjs'
import { distinctUntilChanged, filter, map, share, startWith, throttleTime } from 'rxjs/operators'
import { AfterContentChecked, Directive, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core'
-import { fromEvent, Observable, Subscription } from 'rxjs'
@Directive({
selector: '[myInfiniteScroller]'
}
private getMaximumScroll () {
- return this.container.scrollHeight - window.innerHeight
+ const elementHeight = this.onItself ? this.container.clientHeight : window.innerHeight
+
+ return this.container.scrollHeight - elementHeight
}
private hasScroll () {