mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
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:
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. */
|
||||
|
||||
Reference in New Issue
Block a user