#232 - Tentative fix
This commit is contained in:
@@ -5,24 +5,27 @@
|
||||
import { cacheManager } from '../cache-manager'
|
||||
|
||||
export let initialValue = ''
|
||||
let initialSet = false
|
||||
export let placeholder = ''
|
||||
let initialSet = false
|
||||
let value = ''
|
||||
let elInput: HTMLInputElement
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
export function setInputValue(v: string): void {
|
||||
console.log('setinput')
|
||||
value = v
|
||||
}
|
||||
|
||||
$: {
|
||||
if (initialValue && !initialSet && !value) {
|
||||
function watchInitialValue(v: string): void {
|
||||
if (v && !initialSet && !value) {
|
||||
initialSet = true
|
||||
value = initialValue
|
||||
value = v
|
||||
selectInput()
|
||||
}
|
||||
}
|
||||
|
||||
$: watchInitialValue(initialValue)
|
||||
|
||||
function selectInput(_?: HTMLElement): void {
|
||||
tick()
|
||||
.then(() => {
|
||||
@@ -46,7 +49,7 @@
|
||||
<div class="omnisearch-input-field">
|
||||
<input
|
||||
bind:this="{elInput}"
|
||||
bind:value
|
||||
bind:value="{value}"
|
||||
class="prompt-input"
|
||||
use:selectInput
|
||||
on:compositionend="{_ => toggleInputComposition(false)}"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
import { searchEngine } from 'src/search/omnisearch'
|
||||
|
||||
export let modal: OmnisearchVaultModal
|
||||
export let previousQuery: string | undefined
|
||||
let previousQuery: string | undefined
|
||||
let selectedIndex = 0
|
||||
let historySearchIndex = 0
|
||||
let searchQuery: string | undefined
|
||||
|
||||
Reference in New Issue
Block a user