prettier
This commit is contained in:
@@ -1,32 +1,31 @@
|
||||
<script lang="ts">
|
||||
import { debounce } from "obsidian"
|
||||
import { toggleInputComposition } from "src/globals"
|
||||
import { createEventDispatcher, onMount, tick } from "svelte"
|
||||
import { debounce } from 'obsidian'
|
||||
import { toggleInputComposition } from 'src/globals'
|
||||
import { createEventDispatcher, onMount, tick } from 'svelte'
|
||||
|
||||
export let value = ""
|
||||
const dispatch = createEventDispatcher()
|
||||
export let value = ''
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
let elInput: HTMLInputElement
|
||||
let elInput: HTMLInputElement
|
||||
|
||||
onMount(async () => {
|
||||
await tick()
|
||||
elInput.focus()
|
||||
elInput.select()
|
||||
})
|
||||
onMount(async () => {
|
||||
await tick()
|
||||
elInput.focus()
|
||||
elInput.select()
|
||||
})
|
||||
|
||||
const debouncedOnInput = debounce(() => {
|
||||
dispatch("input", value)
|
||||
}, 100)
|
||||
const debouncedOnInput = debounce(() => {
|
||||
dispatch('input', value)
|
||||
}, 100)
|
||||
</script>
|
||||
|
||||
<input
|
||||
bind:value
|
||||
bind:this={elInput}
|
||||
on:input={debouncedOnInput}
|
||||
on:compositionstart={(_) => toggleInputComposition(true)}
|
||||
on:compositionend={(_) => toggleInputComposition(false)}
|
||||
on:compositionstart={_ => toggleInputComposition(true)}
|
||||
on:compositionend={_ => toggleInputComposition(false)}
|
||||
type="text"
|
||||
class="prompt-input"
|
||||
placeholder="Type to search through your notes"
|
||||
spellcheck="false"
|
||||
/>
|
||||
spellcheck="false" />
|
||||
|
||||
Reference in New Issue
Block a user