Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cdk/scrolling): unsubscribe from scrolled stream when viewport is…
… destroyed (#27800) Initially the virtual scroll viewport was written under the assumption that it is the scrollable and that it doesn't need to unsubscribe from its `elementScrolled` stream, because it'll be completed on destroy. This might not be the case if a `CdkVirtualScrollableElement` is provided and the viewport might be destroyed without the scrollable being destroyed. These changes add a `takeUntil` to avoid any potential leaks. Fixes #27799. (cherry picked from commit 31187ab)
- Loading branch information