Skip to content
Source
Sign inSign up
TanStack/form
Open History to see the last commit

FieldGroupOptions.md

118 lines3.0 KB

1---
2id: FieldGroupOptions
3title: FieldGroupOptions
4---
5​
6# Interface: FieldGroupOptions\<TFormData, TFieldGroupData, TFields, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta\>
7​
8Defined in: [packages/form-core/src/FieldGroupApi.ts:50](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldGroupApi.ts#L50)
9​
10An object representing the options for a field group.
11​
12## Type Parameters
13​
14### TFormData
15​
16`TFormData`
17​
18### TFieldGroupData
19​
20`TFieldGroupData`
21​
22### TFields
23​
24`TFields` *extends*
25 \| [`DeepKeysOfType`](../type-aliases/DeepKeysOfType.md)\<`TFormData`, `TFieldGroupData` \| `null` \| `undefined`\>
26 \| [`FieldsMap`](../type-aliases/FieldsMap.md)\<`TFormData`, `TFieldGroupData`\>
27​
28### TOnMount
29​
30`TOnMount` *extends* `undefined` \| `FormValidateOrFn`\<`TFormData`\>
31​
32### TOnChange
33​
34`TOnChange` *extends* `undefined` \| `FormValidateOrFn`\<`TFormData`\>
35​
36### TOnChangeAsync
37​
38`TOnChangeAsync` *extends* `undefined` \| `FormAsyncValidateOrFn`\<`TFormData`\>
39​
40### TOnBlur
41​
42`TOnBlur` *extends* `undefined` \| `FormValidateOrFn`\<`TFormData`\>
43​
44### TOnBlurAsync
45​
46`TOnBlurAsync` *extends* `undefined` \| `FormAsyncValidateOrFn`\<`TFormData`\>
47​
48### TOnSubmit
49​
50`TOnSubmit` *extends* `undefined` \| `FormValidateOrFn`\<`TFormData`\>
51​
52### TOnSubmitAsync
53​
54`TOnSubmitAsync` *extends* `undefined` \| `FormAsyncValidateOrFn`\<`TFormData`\>
55​
56### TOnDynamic
57​
58`TOnDynamic` *extends* `undefined` \| `FormValidateOrFn`\<`TFormData`\>
59​
60### TOnDynamicAsync
61​
62`TOnDynamicAsync` *extends* `undefined` \| `FormAsyncValidateOrFn`\<`TFormData`\>
63​
64### TOnServer
65​
66`TOnServer` *extends* `undefined` \| `FormAsyncValidateOrFn`\<`TFormData`\>
67​
68### TSubmitMeta
69​
70`TSubmitMeta` = `never`
71​
72## Properties
73​
74### defaultValues?
75​
76```ts
77optional defaultValues: TFieldGroupData;
78```
79​
80Defined in: [packages/form-core/src/FieldGroupApi.ts:106](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldGroupApi.ts#L106)
81​
82The expected subsetValues that the form must provide.
83​
84***
85​
86### fields
87​
88```ts
89fields: TFields;
90```
91​
92Defined in: [packages/form-core/src/FieldGroupApi.ts:102](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldGroupApi.ts#L102)
93​
94The path to the field group data.
95​
96***
97​
98### form
99​
100```ts
101form:
102 | FormApi<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta>
103| FieldGroupApi<any, TFormData, any, any, any, any, any, any, any, any, any, any, any, TSubmitMeta>;
104```
105​
106Defined in: [packages/form-core/src/FieldGroupApi.ts:68](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldGroupApi.ts#L68)
107​
108***
109​
110### onSubmitMeta?
111​
112```ts
113optional onSubmitMeta: TSubmitMeta;
114```
115​
116Defined in: [packages/form-core/src/FieldGroupApi.ts:110](https://github.com/TanStack/form/blob/main/packages/form-core/src/FieldGroupApi.ts#L110)
117​
118onSubmitMeta, the data passed from the handleSubmit handler, to the onSubmit function props