blob: d5971bcc89b12ea5bd0a236c740599b52956d96a (
plain) (
tree)
|
|
<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={'q'}
/>
|