From 0577b6f189cdd49c135c48e990c8c6e9fa21a6ee Mon Sep 17 00:00:00 2001 From: Chris Amico Date: Thu, 28 Mar 2024 22:22:26 -0400 Subject: [PATCH] Only watch in auto mode --- src/lib/components/documents/ResultsList.svelte | 12 ++++++++---- .../documents/stories/ResultsList.stories.svelte | 4 ++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/lib/components/documents/ResultsList.svelte b/src/lib/components/documents/ResultsList.svelte index c85707982..f07bfa7e6 100644 --- a/src/lib/components/documents/ResultsList.svelte +++ b/src/lib/components/documents/ResultsList.svelte @@ -42,7 +42,7 @@ count = r.count; next = r.next; loading = false; - watch(); + if (auto) watch(); } function watch() { @@ -91,9 +91,13 @@ {/each}
{#if next} - + {/if}
diff --git a/src/lib/components/documents/stories/ResultsList.stories.svelte b/src/lib/components/documents/stories/ResultsList.stories.svelte index 360d7dc3b..9e31ad2a5 100644 --- a/src/lib/components/documents/stories/ResultsList.stories.svelte +++ b/src/lib/components/documents/stories/ResultsList.stories.svelte @@ -24,3 +24,7 @@
+ + +
+