From ab9cde60eb1ff53da54a50bee4d2dec8079ea479 Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 25 Jul 2022 09:05:12 -0600 Subject: [PATCH] Don't error when validating any remaining Lion widgets --- api/js/etemplate/Et2InputWidget/Et2InputWidget.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts b/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts index 3cd46dd3b8..3feb44e183 100644 --- a/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts +++ b/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts @@ -400,9 +400,16 @@ const Et2InputWidgetMixin = >(superclass : T) let feedback = document.createElement("lion-validation-feedback"); feedback.feedbackData = feedbackData; feedback.slot = "help-text"; - this.append(feedback); - // Not always visible? - (this.shadowRoot.querySelector("#help-text")).style.display = "initial"; + if(this.shadowRoot.querySelector("slot[name='feedback']")) + { + feedback.slot = "feedback"; + } + else + { + this.append(feedback); + // Not always visible? + (this.shadowRoot.querySelector("#help-text")).style.display = "initial"; + } } }