From e034bd4a1f4d9ea0d4330712e977bcb4f3e822a6 Mon Sep 17 00:00:00 2001 From: Rasmus John Pedersen Date: Tue, 12 Jun 2018 16:37:45 +0200 Subject: [PATCH] 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 --- .../src/common/services/tree.service.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/services/tree.service.js b/src/Umbraco.Web.UI.Client/src/common/services/tree.service.js index 888a067a66..50318c783c 100644 --- a/src/Umbraco.Web.UI.Client/src/common/services/tree.service.js +++ b/src/Umbraco.Web.UI.Client/src/common/services/tree.service.js @@ -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) {