Skip to content

Commit 4c47784

Browse files
committed
address comments
1 parent 528ffff commit 4c47784

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cdk-experimental/scrolling/virtual-scroll-viewport.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,9 @@ export class CdkVirtualScrollViewport implements OnInit, OnDestroy {
310310
private _doChangeDetection() {
311311
this._isChangeDetectionPending = false;
312312

313-
// Apply changes to Angular bindings.
313+
// Apply changes to Angular bindings. Note: We must call `markForCheck` to run change detection
314+
// from the root, since the repeated items are content projected in. Calling `detectChanges`
315+
// instead does not properly check the projected content.
314316
this._ngZone.run(() => this._changeDetectorRef.markForCheck());
315317
// Apply the content transform. The transform can't be set via an Angular binding because
316318
// bypassSecurityTrustStyle is banned in Google. However the value is safe, it's composed of

0 commit comments

Comments
 (0)