Fix unable to clear link value

This commit is contained in:
nathan 2023-12-04 17:06:26 -07:00
parent fd5160e9fe
commit 4343fbca32

View File

@ -121,8 +121,7 @@ export class Et2LinkSearch extends Et2Select
let item = this.select?.querySelector('[value="' + option.value + '"]'); let item = this.select?.querySelector('[value="' + option.value + '"]');
if(item) if(item)
{ {
// Replace instead of changing the whole thing to preserve LitElement marker comments this.requestUpdate();
item.innerHTML = item.innerHTML.replace(Et2Link.MISSING_TITLE, title);
this.select.requestUpdate("value"); this.select.requestUpdate("value");
item.classList.remove("loading"); item.classList.remove("loading");