correct initial value set and remove private version

This commit is contained in:
Niels Lyngsø
2025-01-31 21:13:09 +01:00
parent 23659061a2
commit 09072b6946

View File

@@ -124,7 +124,7 @@ export function UmbFormControlMixin<
* @default
*/
@property({ reflect: false }) // Do not 'reflect' as the attribute value is used as fallback. [NL]
value: ValueType | DefaultValueType;
value: ValueType | DefaultValueType = defaultValue as unknown as DefaultValueType;
// Validation
//private _validityState = new UmbValidityState();
@@ -148,7 +148,6 @@ export function UmbFormControlMixin<
}
private _pristine: boolean = true;
#value: ValueType | DefaultValueType = defaultValue as unknown as DefaultValueType;
protected _internals: ElementInternals;
#form: HTMLFormElement | null = null;
#validators: UmbFormControlValidatorConfig[] = [];