Better fix for Et2SelectState not getting country set

This commit is contained in:
nathan 2022-11-14 14:41:08 -07:00
parent 58f2267fc8
commit 6a5d189489
2 changed files with 8 additions and 10 deletions

View File

@ -110,8 +110,6 @@ class AddressbookApp extends EgwApp
this.check_value(this.et2.getWidgetById(content.presets_fields),0);
}
}
this.regionSetCountry(null, this.et2.getWidgetById("adr_one_countrycode"));
this.regionSetCountry(null, this.et2.getWidgetById("adr_two_countrycode"));
break;
}
}

View File

@ -780,7 +780,7 @@ export class Et2SelectState extends Et2StaticSelectMixin(Et2Select)
{
return {
...super.properties,
country_code: String,
countryCode: String,
}
}
@ -788,24 +788,24 @@ export class Et2SelectState extends Et2StaticSelectMixin(Et2Select)
{
super();
this.country_code = 'DE';
this.countryCode = 'DE';
}
get country_code()
get countryCode()
{
return this.__country_code;
return this.__countryCode;
}
set country_code(code : string)
set countryCode(code : string)
{
this.__country_code = code;
this.static_options = so.state(this, {country_code: this.__country_code});
this.__countryCode = code;
this.static_options = so.state(this, {country_code: code});
this.requestUpdate("select_options");
}
set_country_code(code)
{
this.country_code = code;
this.countryCode = code;
}
}