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

UseFormSetFocus

Set focus on a registered field. You can start to invoke this method after all fields are mounted to the DOM.

@example
useEffect(() => {
  setFocus("name");
}, [setFocus])
// shouldSelect allows to select input's content on focus
<button onClick={() => setFocus("name", { shouldSelect: true })}>Focus</button>
type UseFormSetFocus<TFieldValues extends FieldValues> = <TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(name: TFieldName, options?: SetFocusOptions) => void;

§Type Parameters

§
TFieldValues extends FieldValues
[src]

§Type

§
<TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(name: TFieldName, options?: SetFocusOptions) => void
[src]