Compare commits

...

2 Commits

Author SHA1 Message Date
Magnus Åhall
b35bb30631 Expand tree when selecting node 2023-07-22 09:31:26 +02:00
Magnus Åhall
1a49884a3a Added stuff to TODO 2023-07-22 09:08:19 +02:00
2 changed files with 24 additions and 1 deletions

13
TODO
View File

@ -1,3 +1,14 @@
* Fix dynamic tree updates when adding a new node
* Expand tree to show selected node when going throw goToNode()
* Create new admin user when no user exists
* File deletion
- per file
- when deleting node and child nodes
* Move node
* Tree titles should be user-select none
Long term
=========
* Load tree iteratively when needed
* Notification of timestamps
* Journal with quick insert of date and time

View File

@ -253,6 +253,7 @@ class Tree extends Component {
this.selectedTreeNode = this.treeNodeComponents[node.ID].current
this.selectedTreeNode.selected.value = true
this.selectedTreeNode.expanded.value = true
this.expandToTrunk(node.ID)
}//}}}
crumbsUpdateNodes(node) {//{{{
this.props.app.startNode.Crumbs.forEach(crumb=>{
@ -272,6 +273,17 @@ class Tree extends Component {
if(node !== undefined)
this.setSelected(node)
}//}}}
expandToTrunk(nodeID) {//{{{
let node = this.treeNodes[nodeID]
if(node === undefined)
return
node = this.treeNodes[node.ParentID]
while(node !== undefined) {
this.treeNodeComponents[node.ID].current.expanded.value = true
node = this.treeNodes[node.ParentID]
}
}//}}}
}
class TreeNode extends Component {