mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
Fix SelectAccount didn't always get values into options correctly
This commit is contained in:
parent
9acda4b390
commit
34172704dc
@ -75,7 +75,7 @@ export class Et2SelectAccount extends SelectAccountMixin(Et2Select)
|
||||
{
|
||||
return [];
|
||||
}
|
||||
let select_options : Array<SelectOption> = [...this.__select_options] || [];
|
||||
let select_options : Array<SelectOption> = [...super.select_options] || [];
|
||||
// for primary_group we only display owngroups == own memberships, not other groups
|
||||
if (type === 'primary_group' && this.accountType !== 'accounts')
|
||||
{
|
||||
|
@ -54,6 +54,12 @@ export const SelectAccountMixin = <T extends Constructor<LitElement>>(superclass
|
||||
let val = Array.isArray(this.value) ? this.value : [this.value];
|
||||
for(let id of val)
|
||||
{
|
||||
// Don't add if it's already there
|
||||
if(this.account_options.findIndex(o => o.value == id) != -1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
let account_name = null;
|
||||
let option = <SelectOption>{value: id, label: id + " ..."};
|
||||
this.account_options.push(option);
|
||||
|
Loading…
Reference in New Issue
Block a user