Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/svelte-virtual/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ function createVirtualizerBase<
},
})
virtualizer._willUpdate()
// Force store update in case the range didn't change (e.g. count increased
// but scroll position stayed the same). Without this, the store only
// updates when onChange fires (on range change), so changes like a new
// count that don't shift the visible range would not trigger a re-render.
virtualizerWritable.set(virtualizer)
}

virtualizerWritable = writable(virtualizer, () => {
Expand Down
Loading