From 92063573ca7c438f731a2face6693224d8417907 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Wed, 17 Apr 2024 23:22:51 +0200 Subject: [PATCH] correct implementation --- .../input-number-range/input-number-range.element.ts | 5 ++++- .../bind-validation-message-to-form-control.controller.ts | 6 +++--- .../controllers/form-control-validator.controller.ts | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/components/input-number-range/input-number-range.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/components/input-number-range/input-number-range.element.ts index 051263941e..d51f9ff1c1 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/components/input-number-range/input-number-range.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/components/input-number-range/input-number-range.element.ts @@ -9,7 +9,10 @@ function getNumberOrUndefined(value: string) { } @customElement('umb-input-number-range') -export class UmbInputNumberRangeElement extends UmbFormControlMixin(UmbLitElement, '') { +export class UmbInputNumberRangeElement extends UmbFormControlMixin( + UmbLitElement, + '', +) { @property({ type: String, attribute: 'min-label' }) minLabel = 'Low value'; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/validation/controllers/bind-validation-message-to-form-control.controller.ts b/src/Umbraco.Web.UI.Client/src/packages/core/validation/controllers/bind-validation-message-to-form-control.controller.ts index d894fe2ae8..6e28fe493d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/validation/controllers/bind-validation-message-to-form-control.controller.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/validation/controllers/bind-validation-message-to-form-control.controller.ts @@ -13,9 +13,9 @@ export class UmbBindValidationMessageToFormControl extends UmbControllerBase { #context?: typeof UMB_VALIDATION_CONTEXT.TYPE; - #control: UmbFormControlMixinInterface; + #control: UmbFormControlMixinInterface; - #controlValidator?: ReturnType['addValidator']>; + #controlValidator?: ReturnType['addValidator']>; #messages: Array = []; #isValid = false; @@ -38,7 +38,7 @@ export class UmbBindValidationMessageToFormControl extends UmbControllerBase { } } - constructor(host: UmbControllerHost, formControl: UmbFormControlMixinInterface, dataPath: string) { + constructor(host: UmbControllerHost, formControl: UmbFormControlMixinInterface, dataPath: string) { super(host, ctrlSymbol); this.#control = formControl; this.consumeContext(UMB_VALIDATION_CONTEXT, (context) => { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/validation/controllers/form-control-validator.controller.ts b/src/Umbraco.Web.UI.Client/src/packages/core/validation/controllers/form-control-validator.controller.ts index eff0456f27..b857634f2b 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/validation/controllers/form-control-validator.controller.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/validation/controllers/form-control-validator.controller.ts @@ -12,12 +12,12 @@ export class UmbFormControlValidator extends UmbControllerBase implements UmbVal #context?: typeof UMB_VALIDATION_CONTEXT.TYPE; - #control: UmbFormControlMixinInterface; + #control: UmbFormControlMixinInterface; readonly controllerAlias: UmbControllerAlias; #isValid = true; - constructor(host: UmbControllerHost, formControl: UmbFormControlMixinInterface, dataPath?: string) { + constructor(host: UmbControllerHost, formControl: UmbFormControlMixinInterface, dataPath?: string) { super(host); this.#dataPath = dataPath; this.consumeContext(UMB_VALIDATION_CONTEXT, (context) => {