From 5ba5a642e476ec99a374c030167716e3dd0dae9e Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Tue, 25 Jul 2023 17:06:28 +0200 Subject: [PATCH] Fix Dropdowns --- src/components/FightEditPart.svelte | 2 +- src/components/TypeAheadSearch.svelte | 35 +++++++++++++-------------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/components/FightEditPart.svelte b/src/components/FightEditPart.svelte index c9f71b9..85ae704 100644 --- a/src/components/FightEditPart.svelte +++ b/src/components/FightEditPart.svelte @@ -17,7 +17,7 @@ $: selectPlayers = $players.map(player => { return { name: player.name, - value: player.id + value: player.id.toString() } }).sort((a, b) => a.name.localeCompare(b.name)); diff --git a/src/components/TypeAheadSearch.svelte b/src/components/TypeAheadSearch.svelte index 2ba838c..ac171dc 100644 --- a/src/components/TypeAheadSearch.svelte +++ b/src/components/TypeAheadSearch.svelte @@ -1,31 +1,30 @@ - focus = true} on:keydown={() => focus = true}/> -{#if (openDropdown)} - - {#each filteredItems as item} - selectItem(item)}> - {item.name} - - {/each} - -
-{/if} + + +
+ open = true} on:keydown={() => open = true}/> +
+ {#each filteredItems as item} + + {/each} +