Skip to content

Commit

Permalink
fix(types): remove arguments of PrivateFieldContext.handleReset
Browse files Browse the repository at this point in the history
> `handleReset: () => void`
> Similar to `resetField` but it doesn't accept any arguments and can be safely used as an event handler. The values won't be validated after reset.
> ```ts
> const { handleReset } = useField('field', value => !!value);
>
> // reset the field validation state and its initial value
> handleReset();
> ```
>
> https://vee-validate.logaretm.com/v4/api/use-field#composable-api
  • Loading branch information
iamandrewluca committed Aug 19, 2021
1 parent 4ed8b2a commit 2e45d1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vee-validate/src/types.ts
Expand Up @@ -53,7 +53,7 @@ export interface PrivateFieldContext<TValue = unknown> {
uncheckedValue?: MaybeRef<TValue>;
checked?: ComputedRef<boolean>;
resetField(state?: FieldState<TValue>): void;
handleReset(state?: FieldState<TValue>): void;
handleReset(): void;
validate(): Promise<ValidationResult>;
handleChange(e: Event | unknown, shouldValidate?: boolean): void;
handleBlur(e?: Event): void;
Expand Down

0 comments on commit 2e45d1f

Please sign in to comment.