diff --git a/src/lib/components/documents/ResultsList.svelte b/src/lib/components/documents/ResultsList.svelte index f07bfa7e6..2143cf802 100644 --- a/src/lib/components/documents/ResultsList.svelte +++ b/src/lib/components/documents/ResultsList.svelte @@ -2,7 +2,12 @@ import { writable, type Writable } from "svelte/store"; import Button from "../common/Button.svelte"; - export const selected: Writable<(number | string)[]> = writable([]); + // IDs might be strings or numbers, depending on the API endpoint + // enforce type consistency here to avoid comparison bugs later + export const selected: Writable = writable([]); + export let visible: Writable> = writable(new Set()); + + export let total: Writable = writable(0); @@ -79,7 +89,11 @@ diff --git a/src/routes/app/+page.svelte b/src/routes/app/+page.svelte index 8fb0cb914..45118d32c 100644 --- a/src/routes/app/+page.svelte +++ b/src/routes/app/+page.svelte @@ -1,7 +1,11 @@ @@ -30,8 +42,24 @@ + + + {#if $visible && $total} + Showing {$visible.size} of {$total} results + {/if} +