Loading libs/forms/src/lib/form-control.ts +7 −1 Original line number Diff line number Diff line Loading @@ -169,7 +169,13 @@ export class RxapFormControl<T = any, E extends object = any, Parent extends obj } public reset(formState?: OrBoxedValue<T>, options?: ControlEventOptions): void { super.reset(formState ?? this.initialState, options); const newState = formState ?? this.initialState; if (typeof newState === 'function') { super.reset((newState as any)(), options); } else { super.reset(newState, options); } } public setValidators(newValidator: Validator, updateValueAndValidity: boolean = true): void { Loading libs/forms/src/lib/types.ts +1 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ export interface BoxedValue<T> { disabled?: boolean; } export type OrBoxedValue<T> = T | BoxedValue<T>; export type OrBoxedValue<T> = T | BoxedValue<T> | (() => T); type ArrayType<T> = T extends Array<infer R> ? R : any; Loading Loading
libs/forms/src/lib/form-control.ts +7 −1 Original line number Diff line number Diff line Loading @@ -169,7 +169,13 @@ export class RxapFormControl<T = any, E extends object = any, Parent extends obj } public reset(formState?: OrBoxedValue<T>, options?: ControlEventOptions): void { super.reset(formState ?? this.initialState, options); const newState = formState ?? this.initialState; if (typeof newState === 'function') { super.reset((newState as any)(), options); } else { super.reset(newState, options); } } public setValidators(newValidator: Validator, updateValueAndValidity: boolean = true): void { Loading
libs/forms/src/lib/types.ts +1 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ export interface BoxedValue<T> { disabled?: boolean; } export type OrBoxedValue<T> = T | BoxedValue<T>; export type OrBoxedValue<T> = T | BoxedValue<T> | (() => T); type ArrayType<T> = T extends Array<infer R> ? R : any; Loading