From b735b0f218a8ca278232ae2a092043258b4e6aa5 Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 11 May 2022 13:58:01 -0600 Subject: [PATCH] Fix Et2Description.ts appeared the same if you changed its value via JS --- api/js/etemplate/Et2Description/Et2Description.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/api/js/etemplate/Et2Description/Et2Description.ts b/api/js/etemplate/Et2Description/Et2Description.ts index 94bee0edc8..8c2cb1bd9a 100644 --- a/api/js/etemplate/Et2Description/Et2Description.ts +++ b/api/js/etemplate/Et2Description/Et2Description.ts @@ -132,6 +132,17 @@ export class Et2Description extends Et2Widget(LitElement) implements et2_IDetach this.requestUpdate('value', oldValue); } + requestUpdate(attribute, oldValue) + { + super.requestUpdate(...arguments); + // Due to how we do the rendering into the light DOM (not sure it's right) we need this after + // value change or it won't actually show up + if(attribute == "value" && this.parentNode) + { + this.updateComplete.then(() => render(this._renderContent(), this)); + } + } + _renderContent() { let render = null;