From 2a7692b74b87fbdc82a5fb9c847f8785efccf4e0 Mon Sep 17 00:00:00 2001 From: Tim Haasdyk Date: Tue, 18 Jun 2024 15:55:30 +0200 Subject: [PATCH] Search improvements --- frontend/viewer/src/ProjectView.svelte | 2 +- .../viewer/src/lib/layout/EntryList.svelte | 15 ++++++++-- .../src/lib/search-bar/SearchBar.svelte | 29 ++++++++++++++----- 3 files changed, 35 insertions(+), 11 deletions(-) diff --git a/frontend/viewer/src/ProjectView.svelte b/frontend/viewer/src/ProjectView.svelte index 219bd695f..a8e19f011 100644 --- a/frontend/viewer/src/ProjectView.svelte +++ b/frontend/viewer/src/ProjectView.svelte @@ -55,7 +55,7 @@ const connected = writable(false); const search = writable(''); - + setContext('listSearch', search); const selectedIndexExemplar = writable(undefined); setContext('selectedIndexExamplar', selectedIndexExemplar); diff --git a/frontend/viewer/src/lib/layout/EntryList.svelte b/frontend/viewer/src/lib/layout/EntryList.svelte index f57033848..34ae6685d 100644 --- a/frontend/viewer/src/lib/layout/EntryList.svelte +++ b/frontend/viewer/src/lib/layout/EntryList.svelte @@ -1,8 +1,8 @@ - + $search = undefined} class="w-[700px]" classes={{root: 'items-start', title: 'p-2'}}>
{ dispatch('entrySelected', entry); showSearchDialog = false; - $search = undefined; }} /> {/each} @@ -100,10 +102,23 @@
{/if} {#if $result.entries.length > $displayedEntries.length} -
+
{$result.entries.length - $displayedEntries.length} {#if $result.entries.length === fetchCount}+{/if} - more matching entries... +
+ more matching entries... + +
{/if}