From 967882240a5de4d36b5c1839b2261840783db3dc Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 8 Dec 2015 00:26:08 +0000 Subject: [PATCH] Make sure autoloading sets values as they are loaded --- etemplate/js/et2_widget_tree.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/etemplate/js/et2_widget_tree.js b/etemplate/js/et2_widget_tree.js index b93fd2c5bd..0b8f414528 100644 --- a/etemplate/js/et2_widget_tree.js +++ b/etemplate/js/et2_widget_tree.js @@ -210,6 +210,11 @@ var et2_tree = et2_inputWidget.extend( // Add in the callback so we can keep the two in sync widget.input.AJAX_callback = function(dxmlObject) { widget._dhtmlxtree_json_callback(JSON.parse(dxmlObject.xmlDoc.responseText), widget.input.lastLoadedXMLId); + // Call this in case we added some options that were already selected, but missing + if(widget.options.multiple) + { + widget.set_value(widget.value); + } }; if (widget.options.autoloading)