mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-16 03:30:49 +01:00
Fix Et2LinkSearch did not always get correct option when it was loaded with a value
SearchMixin was incorrectly allowing it as a free entry, so it wasn't being properly loaded by Et2LinkSearch
This commit is contained in:
parent
652e84644b
commit
6095b0e2ae
@ -117,7 +117,7 @@ export class Et2LinkSearch extends Et2Select
|
||||
option.label = title || Et2Link.MISSING_TITLE;
|
||||
option.class = "";
|
||||
// It's probably already been rendered, find the item
|
||||
let item = this.getItems().find(i => i.value === option.value);
|
||||
let item = this.menuItems.find(i => i.value === option.value);
|
||||
if(item)
|
||||
{
|
||||
item.textContent = title;
|
||||
|
@ -408,7 +408,7 @@ export const Et2WithSearchMixin = <T extends Constructor<LitElement>>(superclass
|
||||
}
|
||||
|
||||
// Overridden to add options if allowFreeEntries=true
|
||||
if(typeof this.value == "string" && !this._menuItems.find(o => o.value == this.value && !o.classList.contains('remote')))
|
||||
if(this.allowFreeEntries && typeof this.value == "string" && !this._menuItems.find(o => o.value == this.value && !o.classList.contains('remote')))
|
||||
{
|
||||
this.createFreeEntry(this.value);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user