diff --git a/assets/styles.css b/assets/styles.css index eccf2d5..2e8501e 100644 --- a/assets/styles.css +++ b/assets/styles.css @@ -18,6 +18,7 @@ } .omnisearch-result__title { + white-space: pre-wrap; align-items: center; display: flex; gap: 5px; diff --git a/manifest-beta.json b/manifest-beta.json index 7bc66fd..7ea5551 100644 --- a/manifest-beta.json +++ b/manifest-beta.json @@ -1,7 +1,7 @@ { "id": "omnisearch", "name": "Omnisearch", - "version": "1.14.1-beta.3", + "version": "1.14.1-beta.2", "minAppVersion": "1.0.0", "description": "A search engine that just works", "author": "Simon Cambier", diff --git a/package.json b/package.json index b59c13f..026c0e8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "scambier.obsidian-search", - "version": "1.14.0", + "version": "1.14.1-beta.3", "description": "A search engine for Obsidian", "main": "dist/main.js", "scripts": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4558293..640b074 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -58,7 +58,7 @@ devDependencies: esbuild-plugin-copy: 1.3.0_esbuild@0.14.0 esbuild-svelte: 0.7.1_wvi5wuag3veo5vm52k3h7pgaae jest: 27.5.1 - obsidian: 1.1.1 + obsidian: 1.2.8 prettier: 2.8.1 prettier-plugin-svelte: 2.8.1_sro2v6ld777payjtkjtiuogcxi svelte: 3.54.0 @@ -4119,8 +4119,8 @@ packages: object-keys: 1.1.1 dev: true - /obsidian/1.1.1: - resolution: {integrity: sha512-GcxhsHNkPEkwHEjeyitfYNBcQuYGeAHFs1pEpZIv0CnzSfui8p8bPLm2YKLgcg20B764770B1sYGtxCvk9ptxg==} + /obsidian/1.2.8: + resolution: {integrity: sha512-HrC+feA8o0tXspj4lEAqxb1btwLwHD2oHXSwbbN+CdRHURqbCkuIDLld+nkuyJ1w1c9uvVDRVk8BoeOnWheOrQ==} peerDependencies: '@codemirror/state': ^6.0.0 '@codemirror/view': ^6.0.0 diff --git a/src/components/InputSearch.svelte b/src/components/InputSearch.svelte index e649c54..15b4df2 100644 --- a/src/components/InputSearch.svelte +++ b/src/components/InputSearch.svelte @@ -5,24 +5,26 @@ 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 { + export function setInputValue(v: string): void { 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(() => { @@ -39,14 +41,14 @@ // the next time we open the modal, the search field will be empty cacheManager.addToSearchHistory('') dispatch('input', value) - }, 250) + }, 300)
txt org".