id | title |
---|---|
useField |
useField |
function useField<TParentData, TName, TData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TFormOnMount, TFormOnChange, TFormOnChangeAsync, TFormOnBlur, TFormOnBlurAsync, TFormOnSubmit, TFormOnSubmitAsync, TFormOnServer, TPatentSubmitMeta>(opts): FieldApi<TParentData, TName, TData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TFormOnMount, TFormOnChange, TFormOnChangeAsync, TFormOnBlur, TFormOnBlurAsync, TFormOnSubmit, TFormOnSubmitAsync, TFormOnServer, TPatentSubmitMeta> & ReactFieldApi<TParentData, TFormOnMount, TFormOnChange, TFormOnChangeAsync, TFormOnBlur, TFormOnBlurAsync, TFormOnSubmit, TFormOnSubmitAsync, TFormOnServer, TPatentSubmitMeta>
Defined in: packages/react-form/src/useField.tsx:118
A hook for managing a field in a form.
• TParentData
• TName extends string
• TData
• TOnMount extends undefined
| FieldValidateOrFn
<TParentData
, TName
, TData
>
• TOnChange extends undefined
| FieldValidateOrFn
<TParentData
, TName
, TData
>
• TOnChangeAsync extends undefined
| FieldAsyncValidateOrFn
<TParentData
, TName
, TData
>
• TOnBlur extends undefined
| FieldValidateOrFn
<TParentData
, TName
, TData
>
• TOnBlurAsync extends undefined
| FieldAsyncValidateOrFn
<TParentData
, TName
, TData
>
• TOnSubmit extends undefined
| FieldValidateOrFn
<TParentData
, TName
, TData
>
• TOnSubmitAsync extends undefined
| FieldAsyncValidateOrFn
<TParentData
, TName
, TData
>
• TFormOnMount extends undefined
| FormValidateOrFn
<TParentData
>
• TFormOnChange extends undefined
| FormValidateOrFn
<TParentData
>
• TFormOnChangeAsync extends undefined
| FormAsyncValidateOrFn
<TParentData
>
• TFormOnBlur extends undefined
| FormValidateOrFn
<TParentData
>
• TFormOnBlurAsync extends undefined
| FormAsyncValidateOrFn
<TParentData
>
• TFormOnSubmit extends undefined
| FormValidateOrFn
<TParentData
>
• TFormOnSubmitAsync extends undefined
| FormAsyncValidateOrFn
<TParentData
>
• TFormOnServer extends undefined
| FormAsyncValidateOrFn
<TParentData
>
• TPatentSubmitMeta
UseFieldOptions
<TParentData
, TName
, TData
, TOnMount
, TOnChange
, TOnChangeAsync
, TOnBlur
, TOnBlurAsync
, TOnSubmit
, TOnSubmitAsync
, TFormOnMount
, TFormOnChange
, TFormOnChangeAsync
, TFormOnBlur
, TFormOnBlurAsync
, TFormOnSubmit
, TFormOnSubmitAsync
, TFormOnServer
, TPatentSubmitMeta
>
An object with field options.
FieldApi
<TParentData
, TName
, TData
, TOnMount
, TOnChange
, TOnChangeAsync
, TOnBlur
, TOnBlurAsync
, TOnSubmit
, TOnSubmitAsync
, TFormOnMount
, TFormOnChange
, TFormOnChangeAsync
, TFormOnBlur
, TFormOnBlurAsync
, TFormOnSubmit
, TFormOnSubmitAsync
, TFormOnServer
, TPatentSubmitMeta
> & ReactFieldApi
<TParentData
, TFormOnMount
, TFormOnChange
, TFormOnChangeAsync
, TFormOnBlur
, TFormOnBlurAsync
, TFormOnSubmit
, TFormOnSubmitAsync
, TFormOnServer
, TPatentSubmitMeta
>
The FieldApi
instance for the specified field.