fix mobile tree not expanding automatically on load

This commit is contained in:
zadam
2019-07-30 21:18:43 +02:00
parent b8509c487d
commit 7060700225
4 changed files with 119 additions and 121 deletions

View File

@@ -484,11 +484,11 @@ function initFancyTree(tree) {
}
},
// this is done to automatically lazy load all expanded search notes after tree load
loadChildren: function(event, data) {
data.node.visit(function(subNode){
loadChildren: (event, data) => {
data.node.visit((subNode) => {
// Load all lazy/unloaded child nodes
// (which will trigger `loadChildren` recursively)
if( subNode.isUndefined() && subNode.isExpanded() ) {
if (subNode.isUndefined() && subNode.isExpanded()) {
subNode.load();
}
});