import { type UseFormResetField } from "https://deno.land/x/netzo@0.5.63/deps/react-hook-form.ts";
Reset a field state and reference.
Examples
Example 1
Example 1
<input {...register("firstName", { required: true })} />
<button type="button" onClick={() => resetField("firstName"))}>Reset</button>
Type Parameters
TFieldValues extends FieldValues
definition: <TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(name: TFieldName, options?: Partial<{ keepDirty: boolean; keepTouched: boolean; keepError: boolean; defaultValue: FieldPathValue<TFieldValues, TFieldName>; }>) => void