From 70211094d0bbf1f32ca17ea2baecbc9bfeab00f0 Mon Sep 17 00:00:00 2001 From: lazyloong <2950449004@qq.com> Date: Sat, 19 Oct 2024 18:43:14 +0800 Subject: [PATCH] fix: #64 --- manifest.json | 2 +- package.json | 2 +- src/modal/fileModal.ts | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index d8f5bc1..9a96d01 100644 --- a/manifest.json +++ b/manifest.json @@ -5,5 +5,5 @@ "author": "lazyloong", "minAppVersion": "1.0.0", - "version": "2.27.5" + "version": "2.27.6" } diff --git a/package.json b/package.json index cc286b7..c0843d0 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "obsidian": "github:obsidianmd/obsidian-api", "obsidian-plugin-cli": "^0.9.0", "templater": "github:SilentVoid13/Templater", - "typescript": "^5.3.3" + "typescript": "^5.4.3" }, "dependencies": { "lodash": "^4.17.21" diff --git a/src/modal/fileModal.ts b/src/modal/fileModal.ts index 8381182..d0a35b7 100644 --- a/src/modal/fileModal.ts +++ b/src/modal/fileModal.ts @@ -119,7 +119,8 @@ export default class FileModal extends FuzzyModal { }); } this.setInstructions(prompt); - + } + addTagInput(): void { let inputContainerEl = this.modalEl.querySelector( ".prompt-input-container" ) as HTMLInputElement; @@ -131,6 +132,10 @@ export default class FileModal extends FuzzyModal { }); if (this.plugin.settings.file.searchWithTag) this.tagInput.show(); } + onOpen(): void { + super.onOpen(); + if (!this.tagInput) this.addTagInput(); + } onClose(): void { super.onClose(); this.tags = [];