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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user