8000 fix(template): using tombstoneSize for non-cached items with 0 height · rx-angular/rx-angular@40b5c07 · GitHub
[go: up one dir, main page]

Skip to content

Commit 40b5c07

Browse files
committed
fix(template): using tombstoneSize for non-cached items with 0 height
This fixes an issue where the contentSize of of the autosize virtual scroll strategy is being calculated wrong after the resize observer emitted its first event.
1 parent 96750c4 commit 40b5c07

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/template/experimental/virtual-scrolling/src/lib/scroll-strategies/autosize-virtual-scroll-strategy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ export class AutoSizeVirtualScrollStrategy<
10131013
const isCached = this._virtualItems[index].cached;
10141014
const size = isCached
10151015
? oldSize
1016-
: this.getElementSize(this.getElement(view));
1016+
: this.getElementSize(this.getElement(view)) || this.tombstoneSize;
10171017
this._virtualItems[index].size = size;
10181018
this._virtualItems[index].cached = true;
10191019
return [size, size - oldSize];

0 commit comments

Comments
 (0)
0