From b01673734520e64fa4af556f23c67eb15e7bbaa8 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sun, 6 Oct 2019 21:10:45 +0200 Subject: [PATCH] fix: now scrolls to top if the items array changes. --- VirtualList.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/VirtualList.svelte b/VirtualList.svelte index c92f65a..2f3e1dc 100644 --- a/VirtualList.svelte +++ b/VirtualList.svelte @@ -61,6 +61,7 @@ bottom = remaining * average_height; height_map.length = items.length; + viewport.scrollTo(0, 0); }