Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

UseFormResetField

Reset a field state and reference.

@example
<input {...register("firstName", { required: true })} />
<button type="button" onClick={() => resetField("firstName"))}>Reset</button>
type UseFormResetField<TFieldValues extends FieldValues> = <TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(name: TFieldName, options?: Partial<{
keepDirty: boolean;
keepTouched: boolean;
keepError: boolean;
defaultValue: FieldPathValue<TFieldValues, TFieldName>;
}
>
) => void
;

§Type Parameters

§
TFieldValues extends FieldValues
[src]

§Type

§
<TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(name: TFieldName, options?: Partial<{
keepDirty: boolean;
keepTouched: boolean;
keepError: boolean;
defaultValue: FieldPathValue<TFieldValues, TFieldName>;
}
>
) => void
[src]