[ACS-9765]: type error fix

This commit is contained in:
Anton Ramanovich
2026-03-10 13:14:19 +01:00
parent 68b1b98c83
commit 99e3c87eb0

View File

@@ -37,7 +37,7 @@ export class InfiniteSelectScrollDirective implements AfterViewInit {
ngAfterViewInit() {
this.matSelect.openedChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((opened: boolean) => {
if (opened) {
if (opened && this.matSelect.panel) {
this.itemHeightToWaitBeforeLoadNext = this.getItemHeight() * (InfiniteSelectScrollDirective.MAX_ITEMS / 2);
this.matSelect.panel.nativeElement.addEventListener('scroll', (event: Event) => this.handleScrollEvent(event));
}