From 8d66a50652fdd77dbaa8e426b8b6437c0929e03c Mon Sep 17 00:00:00 2001 From: Marcel Date: Mon, 16 Mar 2026 10:23:21 +0100 Subject: [PATCH] feat: add PersonMultiSelect component for chip-based multi-person selection Replaces the native multi-select pattern with a typeahead + dismissible chips UI. Uses fixed dropdown positioning (same getBoundingClientRect trick as PersonTypeahead) to escape overflow:hidden parents. Co-Authored-By: Claude Sonnet 4.6 --- .../lib/components/PersonMultiSelect.svelte | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 frontend/src/lib/components/PersonMultiSelect.svelte diff --git a/frontend/src/lib/components/PersonMultiSelect.svelte b/frontend/src/lib/components/PersonMultiSelect.svelte new file mode 100644 index 00000000..cffbf38f --- /dev/null +++ b/frontend/src/lib/components/PersonMultiSelect.svelte @@ -0,0 +1,117 @@ + + + + +{#each selectedPersons as person} + +{/each} + +
+
+ {#each selectedPersons as person} + + {person.firstName} {person.lastName} + + + {/each} + + { updateDropdownPosition(); showDropdown = true; }} + placeholder={selectedPersons.length === 0 ? 'Namen tippen...' : ''} + class="flex-1 min-w-[120px] border-none p-1 focus:ring-0 text-sm bg-transparent outline-none" + /> +
+ + {#if showDropdown && (results.length > 0 || loading)} +
+ {#if loading} +
Suche...
+ {:else} + {#each results as person} + +
selectPerson(person)} + role="button" + tabindex="0" + > + {person.lastName}, {person.firstName} +
+ {/each} + {/if} +
+ {/if} +