Commit 80acf79
committed
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)1 parent a79fae4 commit 80acf79
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
239 | 243 | | |
240 | 244 | | |
241 | 245 | | |
| |||
0 commit comments