mirror of
https://github.com/zadam/trilium.git
synced 2025-11-09 07:58:59 +01:00
feat(views/table): allow deleting relations
This commit is contained in:
parent
aba3b5cb19
commit
6fe5a854a7
@ -29,18 +29,15 @@ export function RelationEditor(cell: CellComponent, onRendered, success, cancel,
|
|||||||
|
|
||||||
//set focus on the select box when the editor is selected
|
//set focus on the select box when the editor is selected
|
||||||
onRendered(function(){
|
onRendered(function(){
|
||||||
|
let noteId = "";
|
||||||
|
|
||||||
note_autocomplete.initNoteAutocomplete($editor, {
|
note_autocomplete.initNoteAutocomplete($editor, {
|
||||||
allowCreatingNotes: true,
|
allowCreatingNotes: true,
|
||||||
hideAllButtons: true
|
hideAllButtons: true
|
||||||
}).on("autocomplete:noteselected", (event, suggestion, dataset) => {
|
}).on("autocomplete:noteselected", (event, suggestion, dataset) => {
|
||||||
const notePath = suggestion.notePath;
|
const notePath = suggestion.notePath;
|
||||||
if (!notePath) {
|
noteId = (notePath ?? "").split("/").at(-1);
|
||||||
return;
|
}).on("blur", () => success(noteId));
|
||||||
}
|
|
||||||
|
|
||||||
const noteId = notePath.split("/").at(-1);
|
|
||||||
success(noteId);
|
|
||||||
});
|
|
||||||
editor.focus();
|
editor.focus();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user