More scrollbar fixes
This commit is contained in:
parent
1835df954b
commit
6d9d4f4b24
@ -1,6 +1,6 @@
|
||||
import { AfterViewInit, ChangeDetectionStrategy, Component, forwardRef, Inject, Input, OnDestroy, ViewChild } from '@angular/core';
|
||||
import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
|
||||
import { tap } from 'rxjs/operators';
|
||||
import { delay, tap } from 'rxjs/operators';
|
||||
import { AutoUnsubscribe, trackBy } from '../../utils';
|
||||
import { IListable } from '../models';
|
||||
import { ListingComponent, ListingService } from '../index';
|
||||
@ -39,11 +39,12 @@ export class TableContentComponent<T extends IListable> extends AutoUnsubscribe
|
||||
|
||||
ngAfterViewInit(): void {
|
||||
this.addSubscription = this.scrollViewport.scrolledIndexChange.pipe(tap(index => (this._lastScrolledIndex = index))).subscribe();
|
||||
this.addSubscription = this.listingService.displayedLength$.subscribe(() => {
|
||||
setTimeout(() => {
|
||||
this.hasScrollbarDirective.process();
|
||||
}, 0);
|
||||
});
|
||||
this.addSubscription = this.listingService.displayedLength$
|
||||
.pipe(
|
||||
delay(100),
|
||||
tap(() => this.hasScrollbarDirective.process()),
|
||||
)
|
||||
.subscribe();
|
||||
}
|
||||
|
||||
scrollToLastIndex(): void {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user