Some "invalid option" fixes:

- Don't notify user, just log it to the console
- Fix calendar owner filtered out not loaded options
This commit is contained in:
nathan 2023-05-11 10:56:42 -06:00
parent 91b94a5126
commit d5d217c589
2 changed files with 14 additions and 1 deletions

View File

@ -530,7 +530,7 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect)
const missing = value.filter(v => !this.select_options.some(option => option.value == v));
if(missing.length > 0)
{
this.helpText = this.egw().lang("Invalid option '%1' removed", missing.join(", "));
console.warn("Invalid option '" + missing.join(", ") + " ' removed");
value = value.filter(item => missing.indexOf(item) == -1);
}
}

View File

@ -96,6 +96,19 @@ export class CalendarOwner extends Et2Select
});
}
/**
* Check a value for missing options and remove them.
*
* Override to allow any value, since we won't have all options
*
* @param {string[]} value
* @returns {string[]}
*/
filterOutMissingOptions(value : string[]) : string[]
{
return value;
}
/**
* Override icon for the select option to use lavatar
*