From eb6af4b4f0b561653fe57ec41c272cb1cb127ecc Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Thu, 18 Mar 2021 14:59:11 +0100 Subject: [PATCH] Svelte select is now 100% keyboard useable (or at least in one modal it is....) ref #92 --- src/components/scans/AddScanModal.svelte | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/components/scans/AddScanModal.svelte b/src/components/scans/AddScanModal.svelte index d964b659..73dbe174 100644 --- a/src/components/scans/AddScanModal.svelte +++ b/src/components/scans/AddScanModal.svelte @@ -14,15 +14,14 @@ option.firstname + " " + (option.middlename || "") + " " + option.lastname; const filterRunners = (label, filterText, option) => label.toLowerCase().includes(filterText.toLowerCase()) || - option.id.toString().startsWith(filterText.toLowerCase()); + option.value.toString().startsWith(filterText.toLowerCase()); function focus(el) { el.focus(); } $: runner = 0; - $: runners = []; - $: is_fixed = false; + $: runners = ['One', 'Two', 'Three']; RunnerService.runnerControllerGetAll().then((val) => { - runners = val; + runners = val.map(r => {return {label: getRunnerLabel(r), value: r}}); }); $: distance_input = 0; $: processed_last_submit = true; @@ -133,14 +132,12 @@ class="block text-sm font-medium text-gray-700">{$_('runner')}