From dc4db405d2991d3ec6a114f3b08d3fccd057d3ee Mon Sep 17 00:00:00 2001
From: Wolfgang Müller
Date: Thu, 13 Feb 2025 17:52:16 +0100
Subject: frontend: Migrate to Svelte 5

---
 frontend/src/lib/toolbar/Search.svelte | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

(limited to 'frontend/src/lib/toolbar/Search.svelte')

diff --git a/frontend/src/lib/toolbar/Search.svelte b/frontend/src/lib/toolbar/Search.svelte
index f033258..4806971 100644
--- a/frontend/src/lib/toolbar/Search.svelte
+++ b/frontend/src/lib/toolbar/Search.svelte
@@ -1,13 +1,15 @@
 <script lang="ts">
-	import { page } from '$app/stores';
+	import { page } from '$app/state';
 	import { debounce } from '$lib/Actions';
-	import { BasicFilterContext, getFilterContext } from '$lib/Filter';
 	import { accelerator } from '$lib/Shortcuts';
 
-	const filter = getFilterContext<BasicFilterContext>();
+	interface Props {
+		name: string;
+		field: string;
+		filter: { apply: (params: URLSearchParams) => void };
+	}
 
-	export let name: string;
-	export let field: string;
+	let { name, field = $bindable(), filter }: Props = $props();
 </script>
 
 <input
@@ -16,6 +18,6 @@
 	class="btn-slate w-min"
 	placeholder="Search {name}..."
 	bind:value={field}
-	use:debounce={{ callback: () => $filter.apply($page.url.searchParams) }}
+	use:debounce={{ callback: () => filter.apply(page.url.searchParams) }}
 	use:accelerator={'F'}
 />
-- 
cgit v1.2.3-2-gb3c3

