From 506276f5947702a87108cd154ff565c2e8027273 Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Tue, 4 Feb 2025 19:37:59 -0800 Subject: [PATCH] Fix suggestions component --- src/app/components/ChatStart.svelte | 4 +- src/app/components/ProfileMultiSelect.svelte | 19 ++--- src/app/editor/ProfileSuggestion.svelte | 3 +- src/app/editor/index.ts | 4 +- src/lib/components/SearchSelect.svelte | 83 -------------------- src/lib/components/Suggestions.svelte | 82 +++++++++---------- 6 files changed, 57 insertions(+), 138 deletions(-) delete mode 100644 src/lib/components/SearchSelect.svelte diff --git a/src/app/components/ChatStart.svelte b/src/app/components/ChatStart.svelte index 56fbdaab..dcda9e64 100644 --- a/src/app/components/ChatStart.svelte +++ b/src/app/components/ChatStart.svelte @@ -28,9 +28,7 @@ {#snippet input()} -
- -
+ {/snippet}
diff --git a/src/app/components/ProfileMultiSelect.svelte b/src/app/components/ProfileMultiSelect.svelte index 03de2f85..ecd6d9d4 100644 --- a/src/app/components/ProfileMultiSelect.svelte +++ b/src/app/components/ProfileMultiSelect.svelte @@ -1,5 +1,5 @@ - -
- - input!.getBoundingClientRect(), - }} /> -
diff --git a/src/lib/components/Suggestions.svelte b/src/lib/components/Suggestions.svelte index 63c43565..f85132b2 100644 --- a/src/lib/components/Suggestions.svelte +++ b/src/lib/components/Suggestions.svelte @@ -1,23 +1,17 @@ - - -{#if term} -
-
- {#if term && allowCreate && !items.includes(term)} - - {/if} - {#each items as value, i (value)} - - {/each} -
- {#if items.length === 0} -
No results
+
+
+ {#if $term && allowCreate && !items.includes($term)} + {/if} + {#each items as value, i (value)} + + {/each}
-{/if} + {#if items.length === 0} +
No results
+ {/if} +