11# Class: TanStackField\< TParentData, TName, TFieldValidator, TFormValidator, TData\>
22
3- ## Type parameters
3+ ## Type Parameters
44
55• ** TParentData**
66
@@ -39,9 +39,9 @@ new TanStackField<TParentData, TName, TFieldValidator, TFormValidator, TData>():
3939api : FieldApi < TParentData , TName , TFieldValidator , TFormValidator , TData > ;
4040```
4141
42- #### Source
42+ #### Defined in
4343
44- [ tanstack-field.directive.ts:61] ( https://github.com/TanStack/form/blob/ada0211684adc85c41587b076e1217390ff5344e /packages/angular-form/src/tanstack-field.directive.ts#L61 )
44+ [ tanstack-field.directive.ts:61] ( https://github.com/TanStack/form/blob/2bebfd5214c4cdfbf6feacb7b1e25a6825957062 /packages/angular-form/src/tanstack-field.directive.ts#L61 )
4545
4646***
4747
@@ -51,13 +51,15 @@ api: FieldApi<TParentData, TName, TFieldValidator, TFormValidator, TData>;
5151optional asyncAlways : boolean ;
5252```
5353
54+ If ` true ` , always run async validation, even if there are errors emitted during synchronous validation.
55+
5456#### Implementation of
5557
5658` FieldOptions.asyncAlways `
5759
58- #### Source
60+ #### Defined in
5961
60- [ tanstack-field.directive.ts:50] ( https://github.com/TanStack/form/blob/ada0211684adc85c41587b076e1217390ff5344e /packages/angular-form/src/tanstack-field.directive.ts#L50 )
62+ [ tanstack-field.directive.ts:50] ( https://github.com/TanStack/form/blob/2bebfd5214c4cdfbf6feacb7b1e25a6825957062 /packages/angular-form/src/tanstack-field.directive.ts#L50 )
6163
6264***
6365
@@ -67,13 +69,15 @@ optional asyncAlways: boolean;
6769optional asyncDebounceMs : number ;
6870```
6971
72+ The default time to debounce async validation if there is not a more specific debounce time passed.
73+
7074#### Implementation of
7175
7276` FieldOptions.asyncDebounceMs `
7377
74- #### Source
78+ #### Defined in
7579
76- [ tanstack-field.directive.ts:49] ( https://github.com/TanStack/form/blob/ada0211684adc85c41587b076e1217390ff5344e /packages/angular-form/src/tanstack-field.directive.ts#L49 )
80+ [ tanstack-field.directive.ts:49] ( https://github.com/TanStack/form/blob/2bebfd5214c4cdfbf6feacb7b1e25a6825957062 /packages/angular-form/src/tanstack-field.directive.ts#L49 )
7781
7882***
7983
@@ -83,13 +87,15 @@ optional asyncDebounceMs: number;
8387optional defaultMeta : Partial < FieldMeta > ;
8488```
8589
90+ An optional object with default metadata for the field.
91+
8692#### Implementation of
8793
8894` FieldOptions.defaultMeta `
8995
90- #### Source
96+ #### Defined in
9197
92- [ tanstack-field.directive.ts:59] ( https://github.com/TanStack/form/blob/ada0211684adc85c41587b076e1217390ff5344e /packages/angular-form/src/tanstack-field.directive.ts#L59 )
98+ [ tanstack-field.directive.ts:59] ( https://github.com/TanStack/form/blob/2bebfd5214c4cdfbf6feacb7b1e25a6825957062 /packages/angular-form/src/tanstack-field.directive.ts#L59 )
9399
94100***
95101
@@ -99,13 +105,15 @@ optional defaultMeta: Partial<FieldMeta>;
99105optional defaultValue : NoInfer < TData > ;
100106```
101107
108+ An optional default value for the field.
109+
102110#### Implementation of
103111
104112` FieldOptions.defaultValue `
105113
106- #### Source
114+ #### Defined in
107115
108- [ tanstack-field.directive.ts:48] ( https://github.com/TanStack/form/blob/ada0211684adc85c41587b076e1217390ff5344e /packages/angular-form/src/tanstack-field.directive.ts#L48 )
116+ [ tanstack-field.directive.ts:48] ( https://github.com/TanStack/form/blob/2bebfd5214c4cdfbf6feacb7b1e25a6825957062 /packages/angular-form/src/tanstack-field.directive.ts#L48 )
109117
110118***
111119
@@ -115,13 +123,15 @@ optional defaultValue: NoInfer<TData>;
115123name : TName ;
116124```
117125
126+ The field name. The type will be ` DeepKeys<TParentData> ` to ensure your name is a deep key of the parent dataset.
127+
118128#### Implementation of
119129
120130` FieldOptions.name `
121131
122- #### Source
132+ #### Defined in
123133
124- [ tanstack-field.directive.ts:44] ( https://github.com/TanStack/form/blob/ada0211684adc85c41587b076e1217390ff5344e /packages/angular-form/src/tanstack-field.directive.ts#L44 )
134+ [ tanstack-field.directive.ts:44] ( https://github.com/TanStack/form/blob/2bebfd5214c4cdfbf6feacb7b1e25a6825957062 /packages/angular-form/src/tanstack-field.directive.ts#L44 )
125135
126136***
127137
@@ -131,9 +141,9 @@ name: TName;
131141tanstackField : FormApi < TParentData , TFormValidator > ;
132142```
133143
134- #### Source
144+ #### Defined in
135145
136- [ tanstack-field.directive.ts:52] ( https://github.com/TanStack/form/blob/ada0211684adc85c41587b076e1217390ff5344e /packages/angular-form/src/tanstack-field.directive.ts#L52 )
146+ [ tanstack-field.directive.ts:52] ( https://github.com/TanStack/form/blob/2bebfd5214c4cdfbf6feacb7b1e25a6825957062 /packages/angular-form/src/tanstack-field.directive.ts#L52 )
137147
138148***
139149
@@ -147,9 +157,9 @@ optional unmount: () => void;
147157
148158` void `
149159
150- #### Source
160+ #### Defined in
151161
152- [ tanstack-field.directive.ts:76] ( https://github.com/TanStack/form/blob/ada0211684adc85c41587b076e1217390ff5344e /packages/angular-form/src/tanstack-field.directive.ts#L76 )
162+ [ tanstack-field.directive.ts:76] ( https://github.com/TanStack/form/blob/2bebfd5214c4cdfbf6feacb7b1e25a6825957062 /packages/angular-form/src/tanstack-field.directive.ts#L76 )
153163
154164***
155165
@@ -159,13 +169,15 @@ optional unmount: () => void;
159169optional validatorAdapter : TFieldValidator ;
160170```
161171
172+ A validator provided by an extension, like ` yupValidator ` from ` @tanstack/yup-form-adapter `
173+
162174#### Implementation of
163175
164176` FieldOptions.validatorAdapter `
165177
166- #### Source
178+ #### Defined in
167179
168- [ tanstack-field.directive.ts:51] ( https://github.com/TanStack/form/blob/ada0211684adc85c41587b076e1217390ff5344e /packages/angular-form/src/tanstack-field.directive.ts#L51 )
180+ [ tanstack-field.directive.ts:51] ( https://github.com/TanStack/form/blob/2bebfd5214c4cdfbf6feacb7b1e25a6825957062 /packages/angular-form/src/tanstack-field.directive.ts#L51 )
169181
170182***
171183
@@ -175,13 +187,15 @@ optional validatorAdapter: TFieldValidator;
175187optional validators : NoInfer < FieldValidators < TParentData , TName , TFieldValidator , TFormValidator , TData >> ;
176188```
177189
190+ A list of validators to pass to the field
191+
178192#### Implementation of
179193
180194` FieldOptions.validators `
181195
182- #### Source
196+ #### Defined in
183197
184- [ tanstack-field.directive.ts:56] ( https://github.com/TanStack/form/blob/ada0211684adc85c41587b076e1217390ff5344e /packages/angular-form/src/tanstack-field.directive.ts#L56 )
198+ [ tanstack-field.directive.ts:56] ( https://github.com/TanStack/form/blob/2bebfd5214c4cdfbf6feacb7b1e25a6825957062 /packages/angular-form/src/tanstack-field.directive.ts#L56 )
185199
186200## Methods
187201
@@ -191,6 +205,11 @@ optional validators: NoInfer<FieldValidators<TParentData, TName, TFieldValidator
191205ngOnChanges (): void
192206```
193207
208+ A callback method that is invoked immediately after the
209+ default change detector has checked data-bound properties
210+ if at least one has changed, and before the view and content
211+ children are checked.
212+
194213#### Returns
195214
196215` void `
@@ -199,9 +218,9 @@ ngOnChanges(): void
199218
200219` OnChanges.ngOnChanges `
201220
202- #### Source
221+ #### Defined in
203222
204- [ tanstack-field.directive.ts:88] ( https://github.com/TanStack/form/blob/ada0211684adc85c41587b076e1217390ff5344e /packages/angular-form/src/tanstack-field.directive.ts#L88 )
223+ [ tanstack-field.directive.ts:88] ( https://github.com/TanStack/form/blob/2bebfd5214c4cdfbf6feacb7b1e25a6825957062 /packages/angular-form/src/tanstack-field.directive.ts#L88 )
205224
206225***
207226
@@ -211,6 +230,9 @@ ngOnChanges(): void
211230ngOnDestroy (): void
212231```
213232
233+ A callback method that performs custom clean-up, invoked immediately
234+ before a directive, pipe, or service instance is destroyed.
235+
214236#### Returns
215237
216238` void `
@@ -219,9 +241,9 @@ ngOnDestroy(): void
219241
220242` OnDestroy.ngOnDestroy `
221243
222- #### Source
244+ #### Defined in
223245
224- [ tanstack-field.directive.ts:84] ( https://github.com/TanStack/form/blob/ada0211684adc85c41587b076e1217390ff5344e /packages/angular-form/src/tanstack-field.directive.ts#L84 )
246+ [ tanstack-field.directive.ts:84] ( https://github.com/TanStack/form/blob/2bebfd5214c4cdfbf6feacb7b1e25a6825957062 /packages/angular-form/src/tanstack-field.directive.ts#L84 )
225247
226248***
227249
@@ -231,6 +253,12 @@ ngOnDestroy(): void
231253ngOnInit (): void
232254```
233255
256+ A callback method that is invoked immediately after the
257+ default change detector has checked the directive's
258+ data-bound properties for the first time,
259+ and before any of the view or content children have been checked.
260+ It is invoked only once when the directive is instantiated.
261+
234262#### Returns
235263
236264` void `
@@ -239,6 +267,6 @@ ngOnInit(): void
239267
240268` OnInit.ngOnInit `
241269
242- #### Source
270+ #### Defined in
243271
244- [ tanstack-field.directive.ts:78] ( https://github.com/TanStack/form/blob/ada0211684adc85c41587b076e1217390ff5344e /packages/angular-form/src/tanstack-field.directive.ts#L78 )
272+ [ tanstack-field.directive.ts:78] ( https://github.com/TanStack/form/blob/2bebfd5214c4cdfbf6feacb7b1e25a6825957062 /packages/angular-form/src/tanstack-field.directive.ts#L78 )
0 commit comments