Fixed has scrollbar update
This commit is contained in:
parent
dc203eb7ef
commit
85981c1c3f
@ -15,7 +15,7 @@ import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
|
||||
import { AutoUnsubscribe, Required } from '../../utils';
|
||||
import { IListable, ListingModes, TableColumnConfig } from '../models';
|
||||
import { ListingComponent } from '../listing-component.directive';
|
||||
import { EntitiesService } from '../services';
|
||||
import { EntitiesService, ListingService } from '../services';
|
||||
import { HasScrollbarDirective } from '../../scrollbar';
|
||||
|
||||
const SCROLLBAR_WIDTH = 11;
|
||||
@ -55,6 +55,7 @@ export class TableComponent<T extends IListable> extends AutoUnsubscribe impleme
|
||||
@Inject(forwardRef(() => ListingComponent)) readonly listingComponent: ListingComponent<T>,
|
||||
private readonly _hostRef: ViewContainerRef,
|
||||
readonly entitiesService: EntitiesService<T>,
|
||||
readonly listingService: ListingService<T>,
|
||||
) {
|
||||
super();
|
||||
}
|
||||
@ -72,7 +73,7 @@ export class TableComponent<T extends IListable> extends AutoUnsubscribe impleme
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.addSubscription = this.entitiesService.allLength$.subscribe(() => {
|
||||
this.addSubscription = this.listingService.displayedLength$.subscribe(() => {
|
||||
setTimeout(() => {
|
||||
this.hasScrollbarDirective.process();
|
||||
}, 0);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user