From 2fcf02441023d9d0a6117c2b48435e48956214e3 Mon Sep 17 00:00:00 2001 From: Stephan Richter Date: Tue, 17 Mar 2026 08:28:06 +0100 Subject: [PATCH] implemented mouse action on dropdown Signed-off-by: Stephan Richter --- frontend/src/Components/Autocomplete.svelte | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/frontend/src/Components/Autocomplete.svelte b/frontend/src/Components/Autocomplete.svelte index a3bd1f40..74eae485 100644 --- a/frontend/src/Components/Autocomplete.svelte +++ b/frontend/src/Components/Autocomplete.svelte @@ -42,6 +42,16 @@ console.warn(`${candidate.display} selected, but onSelect not overridden!`) } + async function ondblclick(evt){ + const select = evt.target; + const idx = select.value; + candidate = candidates[idx]; + candidates = []; + selected = []; + console.log(candidate); + onSelect(candidate); + } + async function onkeyup(ev){ if (ignore.includes(ev.key)) return; if (ev.key == 'ArrowDown'){ @@ -96,7 +106,7 @@
{#if candidates && candidates.length > 0} - {#each candidates as candidate,i} {/each}