diff --git a/api/js/etemplate/Et2Select/Et2SelectCategory.ts b/api/js/etemplate/Et2Select/Et2SelectCategory.ts index 30c06a1edb..9dac3856d8 100644 --- a/api/js/etemplate/Et2Select/Et2SelectCategory.ts +++ b/api/js/etemplate/Et2Select/Et2SelectCategory.ts @@ -57,11 +57,9 @@ export class Et2SelectCategory extends Et2Select constructor() { super(); - - this.select_options = so.cat(this); } - connectedCallback() + async connectedCallback() { super.connectedCallback(); @@ -72,6 +70,16 @@ export class Et2SelectCategory extends Et2Select (this.getInstanceManager() && this.getInstanceManager().app) || this.egw().app_name(); } + // If app passes options (addressbook index) we'll use those instead. + // They will be found automatically by update() after ID is set. + await this.updateComplete; + if(this.select_options.length == 0) + { + so.cat(this).then(options => + { + this.select_options = options + }); + } }