fix: use file path instead of filename for finding templates

This commit is contained in:
Kelvin John Falk Szolnoky 2023-12-28 11:54:29 +01:00
parent 841fbec1a3
commit 06946c73da
No known key found for this signature in database
GPG key ID: 02BA666D8C0E7E1B
2 changed files with 17 additions and 11 deletions

View file

@ -17,11 +17,11 @@ export class FileSuggest extends TextInputSuggest<TFile> {
}
renderSuggestion(file: TFile, el: HTMLElement): void {
el.setText(file.name);
el.setText(file.path);
}
selectSuggestion(file: TFile): void {
this.inputEl.value = file.name;
this.inputEl.value = file.path;
this.inputEl.trigger('input');
this.close();
}