From f530348de4aa5db05eff44c801af6251200372cf Mon Sep 17 00:00:00 2001
From: Wolfgang Müller
Date: Fri, 12 Jul 2024 19:54:44 +0200
Subject: build/deps: Update Svelecte to 4.2.2

This includes changes to CSS in order to bring the look & feel in line
with the previous version as much as possible. We can now remove the
warning about TypeScript types (Svelecte 4 now includes them) and retire
the clunky handling of pending options.

Additionally, the focus issue has been fixed, allowing users to tab
through controls without getting stuck.
---
 frontend/src/lib/components/Select.svelte | 22 +---------------------
 1 file changed, 1 insertion(+), 21 deletions(-)

(limited to 'frontend/src/lib/components/Select.svelte')

diff --git a/frontend/src/lib/components/Select.svelte b/frontend/src/lib/components/Select.svelte
index f7e87a4..dece4a5 100644
--- a/frontend/src/lib/components/Select.svelte
+++ b/frontend/src/lib/components/Select.svelte
@@ -1,7 +1,5 @@
 <script lang="ts">
 	import type { ListItem } from '$lib/Utils';
-
-	// @ts-expect-error Svelecte 3 does not have types, and 4 (which does) is pending stabilization
 	import Svelecte from 'svelecte';
 
 	let inputId: string;
@@ -17,12 +15,6 @@
 	export let value: Value;
 
 	export { inputId as id, valueAsObject as object, multiple as multi };
-
-	function optionsPlaceholder(from: Value): Item[] {
-		if (from === undefined || from === null) return [];
-
-		return Array.isArray(from) ? from : [from];
-	}
 </script>
 
 {#if options !== null && options !== undefined}
@@ -39,17 +31,5 @@
 		bind:value
 	/>
 {:else}
-	<Svelecte
-		virtualList
-		valueField="id"
-		labelField="name"
-		disabled
-		options={optionsPlaceholder(value)}
-		{multiple}
-		{clearable}
-		{inputId}
-		{valueAsObject}
-		{placeholder}
-		{value}
-	/>
+	<Svelecte {placeholder} />
 {/if}
-- 
cgit v1.2.3-2-gb3c3

