diff --git a/api/js/etemplate/Et2Link/Et2LinkEntry.ts b/api/js/etemplate/Et2Link/Et2LinkEntry.ts index faa04c5935..09489d8b34 100644 --- a/api/js/etemplate/Et2Link/Et2LinkEntry.ts +++ b/api/js/etemplate/Et2Link/Et2LinkEntry.ts @@ -85,6 +85,10 @@ export class Et2LinkEntry extends Et2InputWidget(FormControlMixin(ValidateMixin( const select = document.createElement("et2-link-search"); if(typeof this._value !== "undefined") { + if(this._value.title) + { + select.select_options = [{value: this._value.id, label: this._value.title}] + } select.app = this._value.app; select.value = this._value.id; } diff --git a/api/js/etemplate/Et2Link/Et2LinkSearch.ts b/api/js/etemplate/Et2Link/Et2LinkSearch.ts index c8b48109ae..4296d7f1f6 100644 --- a/api/js/etemplate/Et2Link/Et2LinkSearch.ts +++ b/api/js/etemplate/Et2Link/Et2LinkSearch.ts @@ -103,8 +103,13 @@ export class Et2LinkSearch extends Et2Select { option.label = title; option.class = ""; - // It's probably already been rendered - this.requestUpdate(); + // It's probably already been rendered, find the item + let item = this.getItems().find(i => i.value === option.value); + if(item) + { + item.textContent = title; + item.classList.remove("loading"); + } }); } }