@matthew.ngo/reform
Version:
A flexible and powerful React form management library with advanced validation, state observation, and multi-group support
24 lines (23 loc) • 817 B
TypeScript
import React from "react";
import { Control, FieldValues } from "react-hook-form";
import { FormGroup } from "../core/form/form-groups";
interface ReformControllerProps<TFieldValues extends FieldValues = FieldValues> {
index: number;
field: string;
control: Control<TFieldValues>;
render: (props: {
field: any;
fieldState: any;
formState: any;
}) => React.ReactElement;
rules?: any;
defaultValue?: any;
shouldUnregister?: boolean;
name?: never;
}
export declare const ReformController: <TFieldValues extends {
groups: Array<FormGroup<any>>;
} = {
groups: Array<FormGroup<any>>;
}>({ index, field, control, render, rules, defaultValue, shouldUnregister, }: ReformControllerProps<TFieldValues>) => React.JSX.Element;
export {};