diff --git a/addressbook/js/app.js b/addressbook/js/app.js index 6b7f0ace55..b7f1c54f1b 100644 --- a/addressbook/js/app.js +++ b/addressbook/js/app.js @@ -485,8 +485,6 @@ var AddressbookApp = /** @class */ (function (_super) { var region = this.et2.getWidgetById(selectbox.name.replace('countrycode', 'region')); if (region) { region.set_country_code(selectbox.value); - region.options.select_options = {}; - region.transformAttributes(region.options); } }; /** diff --git a/addressbook/js/app.ts b/addressbook/js/app.ts index 6d6b452bfc..0a8a892fa8 100644 --- a/addressbook/js/app.ts +++ b/addressbook/js/app.ts @@ -577,8 +577,6 @@ class AddressbookApp extends EgwApp if (region) { region.set_country_code(selectbox.value); - region.options.select_options = {}; - region.transformAttributes(region.options); } } diff --git a/api/js/etemplate/et2_widget_taglist.js b/api/js/etemplate/et2_widget_taglist.js index aa4ec398b2..f16f22cb9f 100644 --- a/api/js/etemplate/et2_widget_taglist.js +++ b/api/js/etemplate/et2_widget_taglist.js @@ -1255,8 +1255,14 @@ var et2_taglist_state = /** @class */ (function (_super) { }; et2_taglist_state.prototype.set_country_code = function (_country_code) { var country_code = _country_code || ''; + var old_code = this.options.country_code; this.country_code = country_code; this.options.country_code = country_code; + // Reload if needed + if (this.options.country_code !== old_code && this.isInTree()) { + var sel_options = et2_widget_selectbox_1.et2_selectbox.find_select_options(this, {}, this.options); + this.set_select_options(sel_options); + } }; et2_taglist_state._attributes = { "minChars": { diff --git a/api/js/etemplate/et2_widget_taglist.ts b/api/js/etemplate/et2_widget_taglist.ts index c623084caa..f890409f8c 100644 --- a/api/js/etemplate/et2_widget_taglist.ts +++ b/api/js/etemplate/et2_widget_taglist.ts @@ -1478,8 +1478,16 @@ class et2_taglist_state extends et2_taglist set_country_code(_country_code) { let country_code = _country_code || ''; + let old_code = this.options.country_code; this.country_code = country_code; this.options.country_code = country_code; + + // Reload if needed + if(this.options.country_code !== old_code && this.isInTree()) + { + var sel_options = et2_selectbox.find_select_options(this, {}, this.options); + this.set_select_options(sel_options); + } } } et2_register_widget(et2_taglist_state, ["taglist-state"]);