Field

Variable: Field()

ts
const Field: <TParentData, TName, TData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TFormOnMount, TFormOnChange, TFormOnChangeAsync, TFormOnBlur, TFormOnBlurAsync, TFormOnSubmit, TFormOnSubmitAsync, TFormOnDynamic, TFormOnDynamicAsync, TFormOnServer, TPatentSubmitMeta>(__namedParameters) => ReactNode | Promise<ReactNode>;
const Field: <TParentData, TName, TData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TFormOnMount, TFormOnChange, TFormOnChangeAsync, TFormOnBlur, TFormOnBlurAsync, TFormOnSubmit, TFormOnSubmitAsync, TFormOnDynamic, TFormOnDynamicAsync, TFormOnServer, TPatentSubmitMeta>(__namedParameters) => ReactNode | Promise<ReactNode>;

Defined in: packages/react-form/src/useField.tsx:594

A function component that takes field options and a render function as children and returns a React component.

The Field component uses the useField hook internally to manage the field instance.

Type Parameters

TParentData

TParentData

TName

TName extends string

TData

TData

TOnMount

TOnMount extends FieldValidateOrFn<TParentData, TName, TData> | undefined

TOnChange

TOnChange extends FieldValidateOrFn<TParentData, TName, TData> | undefined

TOnChangeAsync

TOnChangeAsync extends FieldAsyncValidateOrFn<TParentData, TName, TData> | undefined

TOnBlur

TOnBlur extends FieldValidateOrFn<TParentData, TName, TData> | undefined

TOnBlurAsync

TOnBlurAsync extends FieldAsyncValidateOrFn<TParentData, TName, TData> | undefined

TOnSubmit

TOnSubmit extends FieldValidateOrFn<TParentData, TName, TData> | undefined

TOnSubmitAsync

TOnSubmitAsync extends FieldAsyncValidateOrFn<TParentData, TName, TData> | undefined

TOnDynamic

TOnDynamic extends FieldValidateOrFn<TParentData, TName, TData> | undefined

TOnDynamicAsync

TOnDynamicAsync extends FieldAsyncValidateOrFn<TParentData, TName, TData> | undefined

TFormOnMount

TFormOnMount extends FormValidateOrFn<TParentData> | undefined

TFormOnChange

TFormOnChange extends FormValidateOrFn<TParentData> | undefined

TFormOnChangeAsync

TFormOnChangeAsync extends FormAsyncValidateOrFn<TParentData> | undefined

TFormOnBlur

TFormOnBlur extends FormValidateOrFn<TParentData> | undefined

TFormOnBlurAsync

TFormOnBlurAsync extends FormAsyncValidateOrFn<TParentData> | undefined

TFormOnSubmit

TFormOnSubmit extends FormValidateOrFn<TParentData> | undefined

TFormOnSubmitAsync

TFormOnSubmitAsync extends FormAsyncValidateOrFn<TParentData> | undefined

TFormOnDynamic

TFormOnDynamic extends FormValidateOrFn<TParentData> | undefined

TFormOnDynamicAsync

TFormOnDynamicAsync extends FormAsyncValidateOrFn<TParentData> | undefined

TFormOnServer

TFormOnServer extends FormAsyncValidateOrFn<TParentData> | undefined

TPatentSubmitMeta

TPatentSubmitMeta

Parameters

__namedParameters

FieldComponentProps<TParentData, TName, TData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TFormOnMount, TFormOnChange, TFormOnChangeAsync, TFormOnBlur, TFormOnBlurAsync, TFormOnSubmit, TFormOnSubmitAsync, TFormOnDynamic, TFormOnDynamicAsync, TFormOnServer, TPatentSubmitMeta>

Returns

ReactNode | Promise<ReactNode>