@modular-forms/react
Version:
The modular and type-safe form library for React
9 lines (8 loc) • 396 B
TypeScript
import type { FieldPath, FieldValues, FormStore, ResponseData } from '../types';
/**
* Focuses the specified field of the form.
*
* @param form The form of the field.
* @param name The name of the field.
*/
export declare function focus<TFieldValues extends FieldValues, TResponseData extends ResponseData>(form: FormStore<TFieldValues, TResponseData>, name: FieldPath<TFieldValues>): void;