From fc0ce3332a45c08596dba1ef9f7b42ce884f479e Mon Sep 17 00:00:00 2001 From: afn Date: Sun, 27 Nov 2022 12:21:58 -0500 Subject: [PATCH] feat: search debounce --- src/lib/components/atoms/Search.svelte | 21 ++++++++++++++-- src/lib/components/molecules/TreeMenu.svelte | 9 ++++++- src/routes/patches/+page.svelte | 25 +++++++++++++------- 3 files changed, 44 insertions(+), 11 deletions(-) diff --git a/src/lib/components/atoms/Search.svelte b/src/lib/components/atoms/Search.svelte index d5995cb..a7bbb56 100644 --- a/src/lib/components/atoms/Search.svelte +++ b/src/lib/components/atoms/Search.svelte @@ -3,8 +3,19 @@ export let searchTerm: string | null; import { fade } from 'svelte/transition'; import { quintOut } from 'svelte/easing'; + // import { onMount } from 'svelte'; + + // let search: HTMLInputElement; + + // function handleKeydown(event) { + // if (event.code === 'Slash') { + // search.focus; + // } + // } + +
Search {#if searchTerm} @@ -17,7 +28,13 @@ transition:fade|local={{ easing: quintOut, duration: 250 }} /> {/if} - +