From 2b848622fb04976c2a484144d90a7f8975495896 Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 21 Jul 2022 13:45:24 -0600 Subject: [PATCH] Add missing validator variables --- api/js/etemplate/Et2InputWidget/Et2InputWidget.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts b/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts index 35963e7266..3cd46dd3b8 100644 --- a/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts +++ b/api/js/etemplate/Et2InputWidget/Et2InputWidget.ts @@ -3,7 +3,7 @@ import {Et2Widget} from "../Et2Widget/Et2Widget"; import {css, dedupeMixin, LitElement, PropertyValues} from "@lion/core"; import {Required} from "../Validators/Required"; import {ManualMessage} from "../Validators/ManualMessage"; -import {LionValidationFeedback} from "@lion/form-core"; +import {LionValidationFeedback, Validator} from "@lion/form-core"; /** * This mixin will allow any LitElement to become an Et2InputWidget @@ -48,6 +48,11 @@ const Et2InputWidgetMixin = >(superclass : T) protected _oldValue : string | number | Object; protected node : HTMLElement; + // Validators assigned to one specific instance of a widget + protected validators : Validator[]; + // Validators for every instance of a type of widget + protected defaultValidators : Validator[]; + /** WebComponent **/ static get styles() { @@ -129,6 +134,9 @@ const Et2InputWidgetMixin = >(superclass : T) constructor(...args : any[]) { super(...args); + + this.validators = []; + this.defaultValidators = []; } connectedCallback()