mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-15 04:24:57 +01:00
Fix filtered out invalid values were still left in value
This commit is contained in:
parent
d94c2f7c09
commit
2179423b03
@ -448,7 +448,12 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect)
|
||||
);
|
||||
|
||||
// Check for value using missing options (deleted or otherwise not allowed)
|
||||
valueArray = this.filterOutMissingOptions(valueArray);
|
||||
let filtered = this.filterOutMissingOptions(valueArray);
|
||||
if(filtered.length != valueArray.length)
|
||||
{
|
||||
this.value = filtered;
|
||||
return;
|
||||
}
|
||||
|
||||
// Multiple is allowed to be empty, and if we don't have an emptyLabel nothing to do
|
||||
if(this.multiple || !this.emptyLabel)
|
||||
@ -713,6 +718,15 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect)
|
||||
return tag;
|
||||
}
|
||||
|
||||
blur()
|
||||
{
|
||||
if(typeof super.blur == "function")
|
||||
{
|
||||
super.blur();
|
||||
}
|
||||
this.dropdown.hide();
|
||||
}
|
||||
|
||||
private handleTagRemove(event : CustomEvent, option)
|
||||
{
|
||||
event.stopPropagation();
|
||||
@ -758,6 +772,15 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect)
|
||||
}
|
||||
}
|
||||
|
||||
private et2HandleBlur(event : Event)
|
||||
{
|
||||
if(typeof super.et2HandleBlur === "function")
|
||||
{
|
||||
super.et2HandleBlur(event);
|
||||
}
|
||||
this.dropdown?.hide();
|
||||
}
|
||||
|
||||
/**
|
||||
* Always close the dropdown if an option is clicked, even if multiple=true. This differs from SlSelect,
|
||||
* which leaves the dropdown open for multiple=true
|
||||
|
Loading…
Reference in New Issue
Block a user