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

UseFieldArrayPrepend

Prepend field/fields to the start of the fields and optionally focus. The input value will be registered during this action.

@example
<button type="button" onClick={() => prepend({ name: "data" })}>Prepend</button>
<button type="button" onClick={() => prepend({ name: "data" }, { shouldFocus: false })}>Prepend</button>
<button
  type="button"
  onClick={() => prepend([{ name: "data" }, { name: "data" }])}
>
  Prepend
</button>
type UseFieldArrayPrepend<TFieldValues extends FieldValues, TFieldArrayName extends FieldArrayPath<TFieldValues> = FieldArrayPath<TFieldValues>> = (value: FieldArray<TFieldValues, TFieldArrayName> | FieldArray<TFieldValues, TFieldArrayName>[], options?: FieldArrayMethodProps) => void;

§Type Parameters

§
TFieldValues extends FieldValues
[src]
§
TFieldArrayName extends FieldArrayPath<TFieldValues> = FieldArrayPath<TFieldValues>
[src]

§Type

§
(value: FieldArray<TFieldValues, TFieldArrayName> | FieldArray<TFieldValues, TFieldArrayName>[], options?: FieldArrayMethodProps) => void
[src]