blob: 48069718129f270679cc039eea53f91c5934a9c2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<script lang="ts">
import { page } from '$app/state';
import { debounce } from '$lib/Actions';
import { accelerator } from '$lib/Shortcuts';
interface Props {
name: string;
field: string;
filter: { apply: (params: URLSearchParams) => void };
}
let { name, field = $bindable(), filter }: Props = $props();
</script>
<input
type="text"
size={25}
class="btn-slate w-min"
placeholder="Search {name}..."
bind:value={field}
use:debounce={{ callback: () => filter.apply(page.url.searchParams) }}
use:accelerator={'F'}
/>
|