From ad6b50b3530b41186b9aa1767e976a90c483f662 Mon Sep 17 00:00:00 2001 From: Austin Date: Sun, 6 May 2018 15:00:16 -0500 Subject: [PATCH 1/3] fix(scrolling): data change not updating size --- src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts b/src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts index 66dbcf157676..03fa2f6eaa47 100644 --- a/src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts +++ b/src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts @@ -134,6 +134,7 @@ export class AutoSizeVirtualScrollStrategy implements VirtualScrollStrategy { if (this._viewport) { // TODO(mmalebra): Do something smarter here. this._setScrollOffset(); + this._updateRenderedContentAfterScroll(); } } From b29ae812e5ff21da0ac6ad5e9e4e38307e6d3ce0 Mon Sep 17 00:00:00 2001 From: Austin Date: Mon, 7 May 2018 15:42:12 -0500 Subject: [PATCH 2/3] chore: remove todo --- src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts b/src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts index 03fa2f6eaa47..153dcc8e7f9a 100644 --- a/src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts +++ b/src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts @@ -132,7 +132,6 @@ export class AutoSizeVirtualScrollStrategy implements VirtualScrollStrategy { /** Implemented as part of VirtualScrollStrategy. */ onDataLengthChanged() { if (this._viewport) { - // TODO(mmalebra): Do something smarter here. this._setScrollOffset(); this._updateRenderedContentAfterScroll(); } From 230063fa5c41e0889974ae6493f9dc7fbd1425ab Mon Sep 17 00:00:00 2001 From: Austin Date: Wed, 16 May 2018 13:02:10 -0500 Subject: [PATCH 3/3] chore: more performant fix for jump --- src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts b/src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts index 153dcc8e7f9a..49ab09823093 100644 --- a/src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts +++ b/src/cdk-experimental/scrolling/auto-size-virtual-scroll.ts @@ -133,7 +133,7 @@ export class AutoSizeVirtualScrollStrategy implements VirtualScrollStrategy { onDataLengthChanged() { if (this._viewport) { this._setScrollOffset(); - this._updateRenderedContentAfterScroll(); + this._checkRenderedContentSize(); } }