Don't error when validating any remaining Lion widgets

This commit is contained in:
nathan 2022-07-25 09:05:12 -06:00
parent cd7f2eea60
commit ab9cde60eb

View File

@ -400,9 +400,16 @@ const Et2InputWidgetMixin = <T extends Constructor<LitElement>>(superclass : T)
let feedback = <LionValidationFeedback>document.createElement("lion-validation-feedback"); let feedback = <LionValidationFeedback>document.createElement("lion-validation-feedback");
feedback.feedbackData = feedbackData; feedback.feedbackData = feedbackData;
feedback.slot = "help-text"; feedback.slot = "help-text";
this.append(feedback); if(this.shadowRoot.querySelector("slot[name='feedback']"))
// Not always visible? {
(<HTMLElement>this.shadowRoot.querySelector("#help-text")).style.display = "initial"; feedback.slot = "feedback";
}
else
{
this.append(feedback);
// Not always visible?
(<HTMLElement>this.shadowRoot.querySelector("#help-text")).style.display = "initial";
}
} }
} }