mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:50 +01:00
Fix incorrect type issues on options
This commit is contained in:
parent
ace84d7953
commit
de0c9aa3f4
@ -144,13 +144,13 @@ export const Et2widgetWithSelectMixin = dedupeMixin((superclass) =>
|
||||
*
|
||||
* @param new_options
|
||||
*/
|
||||
set select_options(new_options : SelectOption[] | { [key : string] : string })
|
||||
set select_options(new_options : SelectOption[])
|
||||
{
|
||||
const old_options = this.__select_options;
|
||||
if(!Array.isArray(new_options))
|
||||
{
|
||||
let fixed_options = [];
|
||||
for(let key in new_options)
|
||||
for(let key in <any>new_options)
|
||||
{
|
||||
fixed_options.push({value: key, label: new_options[key]});
|
||||
}
|
||||
@ -169,12 +169,12 @@ export const Et2widgetWithSelectMixin = dedupeMixin((superclass) =>
|
||||
* @deprecated assign to select_options
|
||||
* @param new_options
|
||||
*/
|
||||
set_select_options(new_options : SelectOption[] | { [key : string] : string })
|
||||
set_select_options(new_options : SelectOption[] | { [key : string] : string }[])
|
||||
{
|
||||
this.select_options = new_options;
|
||||
this.select_options = <SelectOption[]>new_options;
|
||||
}
|
||||
|
||||
get select_options()
|
||||
get select_options() : SelectOption[]
|
||||
{
|
||||
return this.__select_options;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user