Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/netzo/deps/react-hook-form.ts>UseFieldArrayInsert

Deno-powered framework for building business web apps
Go to Latest
type alias UseFieldArrayInsert
import { type UseFieldArrayInsert } from "https://deno.land/x/netzo@0.3.91/deps/react-hook-form.ts";

Insert field/fields at particular position and focus.

Examples

Example 1

<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 Parameters

TFieldValues extends FieldValues
optional
TFieldArrayName extends FieldArrayPath<TFieldValues> = FieldArrayPath<TFieldValues>
definition: () => void