From 0d85b3ee48a0f0cf58c479492bf0d76f22fb2070 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 18 Jul 2022 15:27:31 -0600 Subject: [PATCH] Fix missing entry title in writable Et2LinkEntry when value is set from content Timing issue, sometimes title gets back later than we'd like but in this case getting title earlier wasn't working. --- api/js/etemplate/Et2Link/Et2LinkSearch.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/Et2Link/Et2LinkSearch.ts b/api/js/etemplate/Et2Link/Et2LinkSearch.ts index 2a97128fa7..4241fb1bcc 100644 --- a/api/js/etemplate/Et2Link/Et2LinkSearch.ts +++ b/api/js/etemplate/Et2Link/Et2LinkSearch.ts @@ -114,9 +114,15 @@ export class Et2LinkSearch extends Et2Select { item.textContent = title; item.classList.remove("loading"); + this.syncItemsFromValue(); + } + else + { + // Not already rendered, update the select option + this.requestUpdate("select_options"); + // update the displayed text + this.updateComplete.then(this.syncItemsFromValue); } - // update the displayed text - this.syncItemsFromValue(); }); } }