diff --git a/api/js/etemplate/et2_widget_selectAccount.js b/api/js/etemplate/et2_widget_selectAccount.js index 6e2484511e..c7e2132437 100644 --- a/api/js/etemplate/et2_widget_selectAccount.js +++ b/api/js/etemplate/et2_widget_selectAccount.js @@ -624,14 +624,17 @@ var et2_selectAccount_ro = /** @class */ (function (_super) { * Constructor */ function et2_selectAccount_ro(_parent, _attrs, _child) { - var _this = _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_selectAccount_ro._attributes, _child || {})) || this; + var _this = this; /** - Resolve some circular dependency problems here - selectAccount extends link, link is in a file that needs select, - select has menulist wrapper, which needs to know about selectAccount before it allows it - */ + Resolve some circular dependency problems here + selectAccount extends link, link is in a file that needs select, + select has menulist wrapper, which needs to know about selectAccount before it allows it + */ if (_parent.supportedWidgetClasses.indexOf(et2_selectAccount_ro) < 0) { _parent.supportedWidgetClasses.push(et2_selectAccount_ro); + } + _this = _super.call(this, _parent, _attrs, et2_core_inheritance_1.ClassWithAttributes.extendAttributes(et2_selectAccount_ro._attributes, _child || {})) || this; + if (_parent.supportedWidgetClasses.indexOf(et2_selectAccount_ro) > 0) { _parent.addChild(_this); } // Legacy options could have row count or empty label in first slot diff --git a/api/js/etemplate/et2_widget_selectAccount.ts b/api/js/etemplate/et2_widget_selectAccount.ts index 9079a6a92d..f95873987a 100644 --- a/api/js/etemplate/et2_widget_selectAccount.ts +++ b/api/js/etemplate/et2_widget_selectAccount.ts @@ -773,9 +773,7 @@ export class et2_selectAccount_ro extends et2_link_string */ constructor(_parent : et2_widget, _attrs? : WidgetConfig, _child? : object) { - super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_selectAccount_ro._attributes, _child || {})); - - /** + /** Resolve some circular dependency problems here selectAccount extends link, link is in a file that needs select, select has menulist wrapper, which needs to know about selectAccount before it allows it @@ -783,6 +781,13 @@ export class et2_selectAccount_ro extends et2_link_string if(_parent.supportedWidgetClasses.indexOf(et2_selectAccount_ro) < 0) { _parent.supportedWidgetClasses.push(et2_selectAccount_ro); + } + + super(_parent, _attrs, ClassWithAttributes.extendAttributes(et2_selectAccount_ro._attributes, _child || {})); + + + if(_parent.supportedWidgetClasses.indexOf(et2_selectAccount_ro) > 0) + { _parent.addChild(this); }