mirror of
https://github.com/zadam/trilium.git
synced 2025-11-28 19:44:24 +01:00
fix(empty): open note in the correct split pane
This commit is contained in:
parent
f7c0e56cec
commit
210dcfb989
@ -45,10 +45,10 @@ function NoteSearch() {
|
|||||||
if (!suggestion?.notePath) {
|
if (!suggestion?.notePath) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
const ntxId = autocompleteRef.current?.closest(".note-split")?.getAttribute("data-ntx-id") ?? null;
|
||||||
const activeContext = appContext.tabManager.getActiveContext();
|
const activeNoteContext = appContext.tabManager.getNoteContextById(ntxId) ?? appContext.tabManager.getActiveContext();
|
||||||
if (activeContext) {
|
if (activeNoteContext) {
|
||||||
activeContext.setNote(suggestion.notePath);
|
activeNoteContext.setNote(suggestion.notePath);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user