We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 54d771a commit 5ed73b8Copy full SHA for 5ed73b8
2 files changed
.changeset/proud-humans-burn.md
@@ -0,0 +1,5 @@
1
+---
2
+'@tanstack/svelte-virtual': patch
3
4
+
5
+fix(svelte-virtual): force store update when setOptions is called
packages/svelte-virtual/src/index.ts
@@ -53,6 +53,11 @@ function createVirtualizerBase<
53
},
54
})
55
virtualizer._willUpdate()
56
+ // Force store update in case the range didn't change (e.g. count increased
57
+ // but scroll position stayed the same). Without this, the store only
58
+ // updates when onChange fires (on range change), so changes like a new
59
+ // count that don't shift the visible range would not trigger a re-render.
60
+ virtualizerWritable.set(virtualizer)
61
}
62
63
virtualizerWritable = writable(virtualizer, () => {
0 commit comments