correct implementation
This commit is contained in:
@@ -9,7 +9,10 @@ function getNumberOrUndefined(value: string) {
|
||||
}
|
||||
|
||||
@customElement('umb-input-number-range')
|
||||
export class UmbInputNumberRangeElement extends UmbFormControlMixin<string>(UmbLitElement, '') {
|
||||
export class UmbInputNumberRangeElement extends UmbFormControlMixin<string | undefined, typeof UmbLitElement>(
|
||||
UmbLitElement,
|
||||
'',
|
||||
) {
|
||||
@property({ type: String, attribute: 'min-label' })
|
||||
minLabel = 'Low value';
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@ export class UmbBindValidationMessageToFormControl extends UmbControllerBase {
|
||||
|
||||
#context?: typeof UMB_VALIDATION_CONTEXT.TYPE;
|
||||
|
||||
#control: UmbFormControlMixinInterface<unknown, unknown>;
|
||||
#control: UmbFormControlMixinInterface<unknown>;
|
||||
|
||||
#controlValidator?: ReturnType<UmbFormControlMixinInterface<unknown, unknown>['addValidator']>;
|
||||
#controlValidator?: ReturnType<UmbFormControlMixinInterface<unknown>['addValidator']>;
|
||||
#messages: Array<UmbValidationMessage> = [];
|
||||
#isValid = false;
|
||||
|
||||
@@ -38,7 +38,7 @@ export class UmbBindValidationMessageToFormControl extends UmbControllerBase {
|
||||
}
|
||||
}
|
||||
|
||||
constructor(host: UmbControllerHost, formControl: UmbFormControlMixinInterface<unknown, unknown>, dataPath: string) {
|
||||
constructor(host: UmbControllerHost, formControl: UmbFormControlMixinInterface<unknown>, dataPath: string) {
|
||||
super(host, ctrlSymbol);
|
||||
this.#control = formControl;
|
||||
this.consumeContext(UMB_VALIDATION_CONTEXT, (context) => {
|
||||
|
||||
@@ -12,12 +12,12 @@ export class UmbFormControlValidator extends UmbControllerBase implements UmbVal
|
||||
|
||||
#context?: typeof UMB_VALIDATION_CONTEXT.TYPE;
|
||||
|
||||
#control: UmbFormControlMixinInterface<unknown, unknown>;
|
||||
#control: UmbFormControlMixinInterface<unknown>;
|
||||
readonly controllerAlias: UmbControllerAlias;
|
||||
|
||||
#isValid = true;
|
||||
|
||||
constructor(host: UmbControllerHost, formControl: UmbFormControlMixinInterface<unknown, unknown>, dataPath?: string) {
|
||||
constructor(host: UmbControllerHost, formControl: UmbFormControlMixinInterface<unknown>, dataPath?: string) {
|
||||
super(host);
|
||||
this.#dataPath = dataPath;
|
||||
this.consumeContext(UMB_VALIDATION_CONTEXT, (context) => {
|
||||
|
||||
Reference in New Issue
Block a user