Api: Fix some input widgets (eg: Et2LinkEntry) did not display validation error

This commit is contained in:
nathan 2024-10-21 10:10:07 -06:00
parent 4cca7849d9
commit e8c00a7d67

View File

@ -698,7 +698,7 @@ const Et2InputWidgetMixin = <T extends Constructor<LitElement>>(superclass : T)
*/
async validate(skipManual = false)
{
return validate(this,skipManual)
return validate(this, skipManual).then(() => this.requestUpdate());
}
set_validation_error(err : string | false)
@ -799,7 +799,7 @@ const Et2InputWidgetMixin = <T extends Constructor<LitElement>>(superclass : T)
protected _helpTextTemplate() : TemplateResult | typeof nothing
{
const hasHelpTextSlot = this.hasSlotController?.test('help-text');
const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
const hasHelpText = this.helpText ? true : !!hasHelpTextSlot || this.hasFeedbackFor.length > 0;
return hasHelpText ? html`
<div
part="form-control-help-text"