fix(scrolling): provide virtual scroll viewport as scrollable (#14168)

Since the `CdkVirtualScrollViewport` extends `CdkScrollable`, it should also provide itself as a `CdkScrollable` to DI.
This commit is contained in:
Kristiyan Kostadinov
2018-11-27 16:32:29 +01:00
committed by Jeremy Elbourn
parent b448bc8934
commit f00c8a82d0
@@ -50,6 +50,10 @@ function rangesEqual(r1: ListRange, r2: ListRange): boolean {
},
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
providers: [{
provide: CdkScrollable,
useExisting: CdkVirtualScrollViewport,
}]
})
export class CdkVirtualScrollViewport extends CdkScrollable implements OnInit, OnDestroy {
/** Emits when the viewport is detached from a CdkVirtualForOf. */