Skip to content

Commit

Permalink
fix: limit results for file/folder suggesters in Templater settings t…
Browse files Browse the repository at this point in the history
…o 1000 for better performance

refs: #1319
  • Loading branch information
Zachatoo committed May 15, 2024
1 parent 47b674b commit 1bc91c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/settings/suggesters/FileSuggester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class FileSuggest extends TextInputSuggest<TFile> {
}
});

return files;
return files.slice(0, 1000);
}

renderSuggestion(file: TFile, el: HTMLElement): void {
Expand Down
2 changes: 1 addition & 1 deletion src/settings/suggesters/FolderSuggester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class FolderSuggest extends TextInputSuggest<TFolder> {
}
});

return folders;
return folders.slice(0, 1000);
}

renderSuggestion(file: TFolder, el: HTMLElement): void {
Expand Down

0 comments on commit 1bc91c3

Please sign in to comment.