mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 07:08:55 +02:00
feat(views/table): display note title when editing relation
This commit is contained in:
parent
854969e1b8
commit
e411f9932f
@ -159,8 +159,6 @@ export async function buildRowDefinitions(parentNote: FNote, notes: FNote[], inf
|
||||
});
|
||||
}
|
||||
|
||||
console.log("Built row definitions", definitions);
|
||||
|
||||
return definitions;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { CellComponent } from "tabulator-tables";
|
||||
import note_autocomplete from "../../../services/note_autocomplete";
|
||||
import { loadReferenceLinkTitle } from "../../../services/link";
|
||||
import froca from "../../../services/froca";
|
||||
|
||||
export function RelationEditor(cell: CellComponent, onRendered, success, cancel, editorParams){
|
||||
//cell - the cell component for the editable cell
|
||||
@ -20,7 +21,11 @@ export function RelationEditor(cell: CellComponent, onRendered, success, cancel,
|
||||
editor.style.boxSizing = "border-box";
|
||||
|
||||
//Set value of editor to the current value of the cell
|
||||
editor.value = cell.getValue();
|
||||
const noteId = cell.getValue();
|
||||
if (noteId) {
|
||||
const note = froca.getNoteFromCache(noteId);
|
||||
editor.value = note.title;
|
||||
}
|
||||
|
||||
//set focus on the select box when the editor is selected
|
||||
onRendered(function(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user