#102 - Added url scheme + small refactor for public api

This commit is contained in:
Simon Cambier
2022-11-09 22:48:50 +01:00
parent 6be174eeb9
commit c91a958782
7 changed files with 76 additions and 287 deletions

View File

@@ -2,16 +2,18 @@
import { debounce } from 'obsidian'
import { toggleInputComposition } from 'src/globals'
import { createEventDispatcher, tick } from 'svelte'
import { cacheManager } from "../cache-manager"
import { cacheManager } from '../cache-manager'
export let initialValue = ''
let initialSet = false
export let placeholder = ''
let value = ''
let elInput: HTMLInputElement
const dispatch = createEventDispatcher()
$: {
if (initialValue) {
if (initialValue && !initialSet) {
initialSet = true
value = initialValue
selectInput()
}
@@ -42,9 +44,9 @@
on:compositionend="{_ => toggleInputComposition(false)}"
on:compositionstart="{_ => toggleInputComposition(true)}"
on:input="{debouncedOnInput}"
{placeholder}
placeholder="{placeholder}"
spellcheck="false"
type="text"/>
type="text" />
</div>
<slot></slot>
<slot />
</div>

View File

@@ -228,7 +228,7 @@
</script>
<InputSearch
initialValue="{previousQuery}"
initialValue="{searchQuery}"
on:input="{e => (searchQuery = e.detail)}"
placeholder="Omnisearch - Vault">
{#if settings.showCreateButton}