Fixed crumbs

This commit is contained in:
Magnus Åhall 2024-12-19 23:13:41 +01:00
parent 147dc12e99
commit e07258e014
3 changed files with 31 additions and 13 deletions

View file

@ -43,7 +43,7 @@ export class Notes2 extends Component {
this.setState({ startNode: node })
})
}//}}}
goToNode(nodeUUID, dontPush) {//{{{
async goToNode(nodeUUID, dontPush) {//{{{
// Don't switch notes until saved.
if (this.nodeUI.current.nodeModified.value) {
if (!confirm("Changes not saved. Do you want to discard changes?"))
@ -56,7 +56,9 @@ export class Notes2 extends Component {
// New node is fetched in order to retrieve content and files.
// Such data is unnecessary to transfer for tree/navigational purposes.
const node = nodeStore.node(nodeUUID)
const ancestors = await nodeStore.getNodeAncestry(node)
this.nodeUI.current.setNode(node)
this.nodeUI.current.setCrumbs(ancestors)
this.tree.setSelected(node)
}//}}}
logout() {//{{{