mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
Et2SelectCategory: keep options sent from server
For example, addressbook index does this.
This commit is contained in:
parent
e3b095dae7
commit
4936c0e043
@ -57,11 +57,9 @@ export class Et2SelectCategory extends Et2Select
|
|||||||
constructor()
|
constructor()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
|
|
||||||
this.select_options = so.cat(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
connectedCallback()
|
async connectedCallback()
|
||||||
{
|
{
|
||||||
super.connectedCallback();
|
super.connectedCallback();
|
||||||
|
|
||||||
@ -72,6 +70,16 @@ export class Et2SelectCategory extends Et2Select
|
|||||||
(this.getInstanceManager() && this.getInstanceManager().app) ||
|
(this.getInstanceManager() && this.getInstanceManager().app) ||
|
||||||
this.egw().app_name();
|
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
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user