Show newly created node

This commit is contained in:
Magnus Åhall 2026-06-10 17:08:30 +02:00
parent 95a26e67d5
commit c583138270
3 changed files with 11 additions and 4 deletions

View file

@ -212,6 +212,9 @@ export class N2Sidebar extends CustomHTMLElement {
isSelected(node) {//{{{
return this.selectedNode?.UUID === node.UUID
}//}}}
getTreeNode(uuid) {// {{{
return this.treeNodeComponents[uuid]
}// }}}
async keyHandler(event) {//{{{
let handled = true
@ -514,8 +517,8 @@ export class N2TreeNode extends CustomHTMLElement {
if (this.rendered && force_update !== true)
return this
if (this.sidebar.getNodeExpanded(this.node.UUID))
await this.fetchChildren()
if (this.sidebar.getNodeExpanded(this.node.UUID) || force_refetch_children)
await this.fetchChildren(force_refetch_children)
// Update the name and selected status.
this.elName.querySelector('span').innerText = this.node.get('Name')