Update tree node when children are loaded

This fixes the expand/collapse icon not being show when a tree
is autoexpanded, e.g. when refreshing the page
This commit is contained in:
Rasmus John Pedersen
2018-06-12 16:37:45 +02:00
parent 2715d49630
commit e034bd4a1f

View File

@@ -50,7 +50,7 @@ function treeService($q, treeResource, iconHelper, notificationsService, eventsS
parentNode.cssClasses = [];
}
parentNode.cssClasses.push("no-access");
}
}
//create a method outside of the loop to return the parent - otherwise jshint blows up
var funcParent = function() {
@@ -264,6 +264,11 @@ function treeService($q, treeResource, iconHelper, notificationsService, eventsS
args.node.expanded = true;
args.node.hasChildren = true;
}
if (angular.isFunction(args.node.updateNodeData)) {
args.node.updateNodeData(args.node);
}
return data;
}, function(reason) {