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

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

Full-stack Deno framework for building business web apps like internal tools, dashboards, admin panels and automated workflows.
Go to Latest
type alias UseFieldArrayPrepend
import { type UseFieldArrayPrepend } from "https://deno.land/x/netzo@0.4.72/deps/react-hook-form.ts";

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

Examples

Example 1

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

TFieldValues extends FieldValues
optional
TFieldArrayName extends FieldArrayPath<TFieldValues> = FieldArrayPath<TFieldValues>