Skip to content

Build your personal knowledge base with Trilium Notes

chore(client/ts): port bulk_actions/add_relation

Elian Doran27ed750d484b
diff --git a/src/public/app/services/note_autocomplete.ts b/src/public/app/services/note_autocomplete.ts
index 0fa39ed2a3..d83d83f621 100644
--- a/src/public/app/services/note_autocomplete.ts
+++ b/src/public/app/services/note_autocomplete.ts
@@ -146,7 +146,7 @@ function fullTextSearch($el: JQuery<HTMLElement>, options: Options){
setTimeout(() => { options.fastSearch = true; }, 100);
}
-function initNoteAutocomplete($el: JQuery<HTMLElement>, options: Options) {
+function initNoteAutocomplete($el: JQuery<HTMLElement>, options?: Options) {
if ($el.hasClass("note-autocomplete-input") || utils.isMobile()) {
// clear any event listener added in previous invocation of this function
$el.off('autocomplete:noteselected');
diff --git a/src/public/app/widgets/bulk_actions/abstract_bulk_action.ts b/src/public/app/widgets/bulk_actions/abstract_bulk_action.ts
index 77bb9a3d62..07fd221d44 100644
--- a/src/public/app/widgets/bulk_actions/abstract_bulk_action.ts
+++ b/src/public/app/widgets/bulk_actions/abstract_bulk_action.ts
@@ -6,6 +6,8 @@ import FAttribute from "../../entities/fattribute.js";
interface ActionDefinition {
script: string;
+ relationName: string;
+ targetNoteId: string;
}
export default abstract class AbstractBulkAction {
diff --git a/src/public/app/widgets/bulk_actions/relation/add_relation.js b/src/public/app/widgets/bulk_actions/relation/add_relation.ts
similarity index 100%
rename from src/public/app/widgets/bulk_actions/relation/add_relation.js
rename to src/public/app/widgets/bulk_actions/relation/add_relation.ts