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