Skip to content

Commit

Permalink
fix(scroll dispatcher): emit scroll events from cdkScrollable directi…
Browse files Browse the repository at this point in the history
…ve (#2714)
  • Loading branch information
yggg committed May 14, 2021
1 parent dd0c88e commit f715e97
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Inject, Injectable, NgZone } from '@angular/core';
import { CdkScrollable, ScrollDispatcher } from '@angular/cdk/overlay';
import { Observable } from 'rxjs';
import { merge, Observable } from 'rxjs';

import { NbPlatform } from '../platform/platform-service';
import { NbLayoutScrollService } from '../../../services/scroll.service';
Expand All @@ -16,7 +16,10 @@ export class NbScrollDispatcherAdapter extends ScrollDispatcher {
}

scrolled(auditTimeInMs?: number): Observable<CdkScrollable | void> {
return this.scrollService.onScroll();
return merge(
super.scrolled(auditTimeInMs),
this.scrollService.onScroll(),
);
}
}

0 comments on commit f715e97

Please sign in to comment.