Svelte rewrite: search and display results
This commit is contained in:
19
src/CmpInput.svelte
Normal file
19
src/CmpInput.svelte
Normal file
@@ -0,0 +1,19 @@
|
||||
<script lang="ts">
|
||||
import { onMount, tick } from 'svelte'
|
||||
import { searchQuery } from './stores'
|
||||
|
||||
let input: HTMLInputElement
|
||||
|
||||
onMount(async () => {
|
||||
await tick()
|
||||
input.focus()
|
||||
})
|
||||
</script>
|
||||
|
||||
<input
|
||||
bind:this={input}
|
||||
bind:value={$searchQuery}
|
||||
type="text"
|
||||
class="prompt-input"
|
||||
placeholder="Type to search through your notes"
|
||||
/>
|
||||
Reference in New Issue
Block a user