From 765f04b444d6ff18dde35e8c88d882f4dc720bbc Mon Sep 17 00:00:00 2001 From: Allan Lasser Date: Wed, 27 Nov 2024 13:19:34 -0500 Subject: [PATCH] Fix error when missing context value --- .../components/common/HighlightGroup.svelte | 47 ++++++++++--------- .../stories/HighlightGroup.stories.svelte | 8 ++++ .../documents/NoteHighlights.svelte | 5 +- .../documents/PageHighlights.svelte | 5 +- .../stories/NoteHighlights.stories.svelte | 12 ++++- .../stories/PageHighlights.stories.svelte | 13 ++++- 6 files changed, 61 insertions(+), 29 deletions(-) diff --git a/src/lib/components/common/HighlightGroup.svelte b/src/lib/components/common/HighlightGroup.svelte index 548b01c00..0ccfc59f7 100644 --- a/src/lib/components/common/HighlightGroup.svelte +++ b/src/lib/components/common/HighlightGroup.svelte @@ -16,6 +16,7 @@ export let open = false; export let highlights: [string, H][] = []; export let getHref: (id: string) => string; + export let showAll = false; let clientWidth = 1000; $: isSmall = clientWidth < remToPx(27); @@ -46,28 +47,30 @@ {$_("search.matchingResults", { values: { n: highlights.length } })} -
- - -
+ {#if showAll} +
+ + +
+ {/if}