mirror of
https://github.com/lostpaul/obsidian-folder-notes.git
synced 2026-07-22 07:40:24 +00:00
Fix #146
This commit is contained in:
parent
15ac351344
commit
4b5168d3a0
5 changed files with 8 additions and 5 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "folder-notes",
|
||||
"name": "Folder notes",
|
||||
"version": "1.7.30-4-beta",
|
||||
"version": "1.7.30-5-beta",
|
||||
"minAppVersion": "0.15.0",
|
||||
"description": "Create notes within folders that can be accessed without collapsing the folder, similar to the functionality offered in Notion.",
|
||||
"author": "Lost Paul",
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export class FileSuggest extends TextInputSuggest<TFile> {
|
|||
public inputEl: HTMLInputElement,
|
||||
plugin: FolderNotesPlugin
|
||||
) {
|
||||
super(inputEl);
|
||||
super(inputEl, plugin);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ export class FolderSuggest extends TextInputSuggest<TFolder> {
|
|||
plugin: FolderNotesPlugin,
|
||||
public folder?: TFolder,
|
||||
) {
|
||||
super(inputEl);
|
||||
super(inputEl, plugin);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -121,8 +121,9 @@ export abstract class TextInputSuggest<T> implements ISuggestOwner<T> {
|
|||
private suggest: Suggest<T>;
|
||||
plugin: FolderNotesPlugin;
|
||||
|
||||
constructor(inputEl: HTMLInputElement | HTMLTextAreaElement) {
|
||||
constructor(inputEl: HTMLInputElement | HTMLTextAreaElement, plugin: FolderNotesPlugin) {
|
||||
this.inputEl = inputEl;
|
||||
this.plugin = plugin;
|
||||
this.scope = new Scope();
|
||||
|
||||
this.suggestEl = createDiv('suggestion-container');
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ export class TemplateSuggest extends TextInputSuggest<TFile> {
|
|||
public inputEl: HTMLInputElement,
|
||||
plugin: FolderNotesPlugin
|
||||
) {
|
||||
super(inputEl);
|
||||
super(inputEl, plugin);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -28,6 +28,7 @@ export class TemplateSuggest extends TextInputSuggest<TFile> {
|
|||
}
|
||||
|
||||
getSuggestions(input_str: string): TFile[] {
|
||||
console.log('this.plugin', this.plugin)
|
||||
const { templateFolder, templaterPlugin } = getTemplatePlugins(this.plugin.app);
|
||||
if ((!templateFolder || templateFolder?.trim() === '') && !templaterPlugin) {
|
||||
this.plugin.settings.templatePath = '';
|
||||
|
|
@ -39,6 +40,7 @@ export class TemplateSuggest extends TextInputSuggest<TFile> {
|
|||
folder = this.plugin.app.vault.getAbstractFileByPath(templaterPlugin.plugin?.settings?.templates_folder as string) as TFolder;
|
||||
|
||||
} else {
|
||||
console.log('templateFolder', templateFolder);
|
||||
folder = this.plugin.app.vault.getAbstractFileByPath(templateFolder) as TFolder;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue