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

UseFieldArrayInsert

Insert field/fields at particular position and focus.

@example
<button type="button" onClick={() => insert(1, { name: "data" })}>Insert</button>
<button type="button" onClick={() => insert(1, { name: "data" }, { shouldFocus: false })}>Insert</button>
<button
  type="button"
  onClick={() => insert(1, [{ name: "data" }, { name: "data" }])}
>
  Insert
</button>
type UseFieldArrayInsert<TFieldValues extends FieldValues, TFieldArrayName extends FieldArrayPath<TFieldValues> = FieldArrayPath<TFieldValues>> = (
index: number,
value: FieldArray<TFieldValues, TFieldArrayName> | FieldArray<TFieldValues, TFieldArrayName>[],
) => void
;

§Type Parameters

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

§Type

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