mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
Et2Select: Remove any doubled values when setting value
This commit is contained in:
parent
fe7897b563
commit
d02a40ee82
@ -441,7 +441,8 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect)
|
|||||||
}
|
}
|
||||||
if(Array.isArray(val))
|
if(Array.isArray(val))
|
||||||
{
|
{
|
||||||
val = val.map(v => typeof v === 'number' ? v.toString() : v || '');
|
// Make sure value has no duplicates, and values are strings
|
||||||
|
val = [...new Set(val.map(v => typeof v === 'number' ? v.toString() : v || ''))];
|
||||||
}
|
}
|
||||||
this.value = val || '';
|
this.value = val || '';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user