@tanstack/react-form 1.16.0 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/cjs/createFormHook.cjs.map +1 -1
  2. package/dist/cjs/createFormHook.d.cts +11 -11
  3. package/dist/cjs/nextjs/createServerValidate.cjs.map +1 -1
  4. package/dist/cjs/nextjs/createServerValidate.d.cts +2 -2
  5. package/dist/cjs/nextjs/types.d.cts +1 -1
  6. package/dist/cjs/remix/createServerValidate.cjs.map +1 -1
  7. package/dist/cjs/remix/createServerValidate.d.cts +2 -2
  8. package/dist/cjs/remix/types.d.cts +1 -1
  9. package/dist/cjs/start/createServerValidate.cjs.map +1 -1
  10. package/dist/cjs/start/createServerValidate.d.cts +2 -2
  11. package/dist/cjs/start/types.d.cts +1 -1
  12. package/dist/cjs/types.d.cts +2 -2
  13. package/dist/cjs/useField.cjs.map +1 -1
  14. package/dist/cjs/useField.d.cts +11 -11
  15. package/dist/cjs/useFieldGroup.cjs.map +1 -1
  16. package/dist/cjs/useFieldGroup.d.cts +4 -4
  17. package/dist/cjs/useForm.cjs.map +1 -1
  18. package/dist/cjs/useForm.d.cts +6 -6
  19. package/dist/cjs/useTransform.cjs.map +1 -1
  20. package/dist/cjs/useTransform.d.cts +1 -1
  21. package/dist/esm/createFormHook.d.ts +11 -11
  22. package/dist/esm/createFormHook.js.map +1 -1
  23. package/dist/esm/nextjs/createServerValidate.d.ts +2 -2
  24. package/dist/esm/nextjs/createServerValidate.js.map +1 -1
  25. package/dist/esm/nextjs/types.d.ts +1 -1
  26. package/dist/esm/remix/createServerValidate.d.ts +2 -2
  27. package/dist/esm/remix/createServerValidate.js.map +1 -1
  28. package/dist/esm/remix/types.d.ts +1 -1
  29. package/dist/esm/start/createServerValidate.d.ts +2 -2
  30. package/dist/esm/start/createServerValidate.js.map +1 -1
  31. package/dist/esm/start/types.d.ts +1 -1
  32. package/dist/esm/types.d.ts +2 -2
  33. package/dist/esm/useField.d.ts +11 -11
  34. package/dist/esm/useField.js.map +1 -1
  35. package/dist/esm/useFieldGroup.d.ts +4 -4
  36. package/dist/esm/useFieldGroup.js.map +1 -1
  37. package/dist/esm/useForm.d.ts +6 -6
  38. package/dist/esm/useForm.js.map +1 -1
  39. package/dist/esm/useTransform.d.ts +1 -1
  40. package/dist/esm/useTransform.js.map +1 -1
  41. package/package.json +20 -12
  42. package/src/createFormHook.tsx +43 -0
  43. package/src/nextjs/createServerValidate.ts +8 -0
  44. package/src/nextjs/types.ts +2 -0
  45. package/src/remix/createServerValidate.ts +8 -0
  46. package/src/remix/types.ts +2 -0
  47. package/src/start/createServerValidate.tsx +8 -0
  48. package/src/start/types.ts +2 -0
  49. package/src/types.ts +17 -1
  50. package/src/useField.tsx +90 -2
  51. package/src/useFieldGroup.tsx +18 -0
  52. package/src/useForm.tsx +22 -0
  53. package/src/useTransform.ts +1 -1
@@ -89,6 +89,10 @@ export function createFormHookContexts() {
89
89
  any,
90
90
  any,
91
91
  any,
92
+ any,
93
+ any,
94
+ any,
95
+ any,
92
96
  any
93
97
  >
94
98
  }
@@ -114,6 +118,8 @@ export function createFormHookContexts() {
114
118
  any,
115
119
  any,
116
120
  any,
121
+ any,
122
+ any,
117
123
  any
118
124
  >
119
125
  }
@@ -143,6 +149,8 @@ export type AppFieldExtendedReactFormApi<
143
149
  TOnBlurAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
144
150
  TOnSubmit extends undefined | FormValidateOrFn<TFormData>,
145
151
  TOnSubmitAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
152
+ TOnDynamic extends undefined | FormValidateOrFn<TFormData>,
153
+ TOnDynamicAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
146
154
  TOnServer extends undefined | FormAsyncValidateOrFn<TFormData>,
147
155
  TSubmitMeta,
148
156
  TFieldComponents extends Record<string, ComponentType<any>>,
@@ -156,6 +164,8 @@ export type AppFieldExtendedReactFormApi<
156
164
  TOnBlurAsync,
157
165
  TOnSubmit,
158
166
  TOnSubmitAsync,
167
+ TOnDynamic,
168
+ TOnDynamicAsync,
159
169
  TOnServer,
160
170
  TSubmitMeta
161
171
  > &
@@ -169,6 +179,8 @@ export type AppFieldExtendedReactFormApi<
169
179
  TOnBlurAsync,
170
180
  TOnSubmit,
171
181
  TOnSubmitAsync,
182
+ TOnDynamic,
183
+ TOnDynamicAsync,
172
184
  TOnServer,
173
185
  TSubmitMeta,
174
186
  NoInfer<TFieldComponents>
@@ -185,6 +197,8 @@ export interface WithFormProps<
185
197
  TOnBlurAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
186
198
  TOnSubmit extends undefined | FormValidateOrFn<TFormData>,
187
199
  TOnSubmitAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
200
+ TOnDynamic extends undefined | FormValidateOrFn<TFormData>,
201
+ TOnDynamicAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
188
202
  TOnServer extends undefined | FormAsyncValidateOrFn<TFormData>,
189
203
  TSubmitMeta,
190
204
  TFieldComponents extends Record<string, ComponentType<any>>,
@@ -199,6 +213,8 @@ export interface WithFormProps<
199
213
  TOnBlurAsync,
200
214
  TOnSubmit,
201
215
  TOnSubmitAsync,
216
+ TOnDynamic,
217
+ TOnDynamicAsync,
202
218
  TOnServer,
203
219
  TSubmitMeta
204
220
  > {
@@ -216,6 +232,8 @@ export interface WithFormProps<
216
232
  TOnBlurAsync,
217
233
  TOnSubmit,
218
234
  TOnSubmitAsync,
235
+ TOnDynamic,
236
+ TOnDynamicAsync,
219
237
  TOnServer,
220
238
  TSubmitMeta,
221
239
  TFieldComponents,
@@ -249,6 +267,8 @@ export interface WithFieldGroupProps<
249
267
  undefined | FormAsyncValidateOrFn<unknown>,
250
268
  undefined | FormValidateOrFn<unknown>,
251
269
  undefined | FormAsyncValidateOrFn<unknown>,
270
+ undefined | FormValidateOrFn<unknown>,
271
+ undefined | FormAsyncValidateOrFn<unknown>,
252
272
  undefined | FormAsyncValidateOrFn<unknown>,
253
273
  // this types it as 'never' in the render prop. It should prevent any
254
274
  // untyped meta passed to the handleSubmit by accident.
@@ -279,6 +299,8 @@ export function createFormHook<
279
299
  TOnBlurAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
280
300
  TOnSubmit extends undefined | FormValidateOrFn<TFormData>,
281
301
  TOnSubmitAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
302
+ TOnDynamic extends undefined | FormValidateOrFn<TFormData>,
303
+ TOnDynamicAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
282
304
  TOnServer extends undefined | FormAsyncValidateOrFn<TFormData>,
283
305
  TSubmitMeta,
284
306
  >(
@@ -291,6 +313,8 @@ export function createFormHook<
291
313
  TOnBlurAsync,
292
314
  TOnSubmit,
293
315
  TOnSubmitAsync,
316
+ TOnDynamic,
317
+ TOnDynamicAsync,
294
318
  TOnServer,
295
319
  TSubmitMeta
296
320
  >,
@@ -303,6 +327,8 @@ export function createFormHook<
303
327
  TOnBlurAsync,
304
328
  TOnSubmit,
305
329
  TOnSubmitAsync,
330
+ TOnDynamic,
331
+ TOnDynamicAsync,
306
332
  TOnServer,
307
333
  TSubmitMeta,
308
334
  TComponents,
@@ -340,6 +366,8 @@ export function createFormHook<
340
366
  TOnBlurAsync,
341
367
  TOnSubmit,
342
368
  TOnSubmitAsync,
369
+ TOnDynamic,
370
+ TOnDynamicAsync,
343
371
  TOnServer,
344
372
  TSubmitMeta,
345
373
  TComponents
@@ -367,6 +395,8 @@ export function createFormHook<
367
395
  TOnBlurAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
368
396
  TOnSubmit extends undefined | FormValidateOrFn<TFormData>,
369
397
  TOnSubmitAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
398
+ TOnDynamic extends undefined | FormValidateOrFn<TFormData>,
399
+ TOnDynamicAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
370
400
  TOnServer extends undefined | FormAsyncValidateOrFn<TFormData>,
371
401
  TSubmitMeta,
372
402
  TRenderProps extends object = {},
@@ -382,6 +412,8 @@ export function createFormHook<
382
412
  TOnBlurAsync,
383
413
  TOnSubmit,
384
414
  TOnSubmitAsync,
415
+ TOnDynamic,
416
+ TOnDynamicAsync,
385
417
  TOnServer,
386
418
  TSubmitMeta,
387
419
  TComponents,
@@ -396,6 +428,11 @@ export function createFormHook<
396
428
  UnwrapDefaultOrAny<undefined | FormValidateOrFn<TFormData>, TOnBlurAsync>,
397
429
  UnwrapDefaultOrAny<undefined | FormValidateOrFn<TFormData>, TOnSubmit>,
398
430
  UnwrapDefaultOrAny<undefined | FormValidateOrFn<TFormData>, TOnSubmitAsync>,
431
+ UnwrapDefaultOrAny<undefined | FormValidateOrFn<TFormData>, TOnDynamic>,
432
+ UnwrapDefaultOrAny<
433
+ undefined | FormValidateOrFn<TFormData>,
434
+ TOnDynamicAsync
435
+ >,
399
436
  UnwrapDefaultOrAny<undefined | FormValidateOrFn<TFormData>, TOnServer>,
400
437
  UnwrapOrAny<TSubmitMeta>,
401
438
  UnwrapOrAny<TComponents>,
@@ -431,6 +468,8 @@ export function createFormHook<
431
468
  TOnBlurAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
432
469
  TOnSubmit extends undefined | FormValidateOrFn<TFormData>,
433
470
  TOnSubmitAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
471
+ TOnDynamic extends undefined | FormValidateOrFn<TFormData>,
472
+ TOnDynamicAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
434
473
  TOnServer extends undefined | FormAsyncValidateOrFn<TFormData>,
435
474
  TFormSubmitMeta,
436
475
  >(
@@ -446,6 +485,8 @@ export function createFormHook<
446
485
  TOnBlurAsync,
447
486
  TOnSubmit,
448
487
  TOnSubmitAsync,
488
+ TOnDynamic,
489
+ TOnDynamicAsync,
449
490
  TOnServer,
450
491
  unknown extends TSubmitMeta ? TFormSubmitMeta : TSubmitMeta,
451
492
  TComponents,
@@ -465,6 +506,8 @@ export function createFormHook<
465
506
  any,
466
507
  any,
467
508
  any,
509
+ any,
510
+ any,
468
511
  unknown extends TSubmitMeta ? TFormSubmitMeta : TSubmitMeta,
469
512
  TComponents,
470
513
  TFormComponents
@@ -23,6 +23,8 @@ interface CreateServerValidateOptions<
23
23
  TOnBlurAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
24
24
  TOnSubmit extends undefined | FormValidateOrFn<TFormData>,
25
25
  TOnSubmitAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
26
+ TOnDynamic extends undefined | FormValidateOrFn<TFormData>,
27
+ TOnDynamicAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
26
28
  TOnServer extends undefined | FormAsyncValidateOrFn<TFormData>,
27
29
  TSubmitMeta,
28
30
  > extends FormOptions<
@@ -34,6 +36,8 @@ interface CreateServerValidateOptions<
34
36
  TOnBlurAsync,
35
37
  TOnSubmit,
36
38
  TOnSubmitAsync,
39
+ TOnDynamic,
40
+ TOnDynamicAsync,
37
41
  TOnServer,
38
42
  TSubmitMeta
39
43
  > {
@@ -50,6 +54,8 @@ export const createServerValidate =
50
54
  TOnBlurAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
51
55
  TOnSubmit extends undefined | FormValidateOrFn<TFormData>,
52
56
  TOnSubmitAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
57
+ TOnDynamic extends undefined | FormValidateOrFn<TFormData>,
58
+ TOnDynamicAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
53
59
  TOnServer extends undefined | FormAsyncValidateOrFn<TFormData>,
54
60
  TSubmitMeta,
55
61
  >(
@@ -62,6 +68,8 @@ export const createServerValidate =
62
68
  TOnBlurAsync,
63
69
  TOnSubmit,
64
70
  TOnSubmitAsync,
71
+ TOnDynamic,
72
+ TOnDynamicAsync,
65
73
  TOnServer,
66
74
  TSubmitMeta
67
75
  >,
@@ -13,6 +13,8 @@ export type ServerFormState<
13
13
  undefined,
14
14
  undefined,
15
15
  undefined,
16
+ undefined,
17
+ undefined,
16
18
  TOnServer
17
19
  >,
18
20
  'values' | 'errors' | 'errorMap'
@@ -23,6 +23,8 @@ interface CreateServerValidateOptions<
23
23
  TOnBlurAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
24
24
  TOnSubmit extends undefined | FormValidateOrFn<TFormData>,
25
25
  TOnSubmitAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
26
+ TOnDynamic extends undefined | FormValidateOrFn<TFormData>,
27
+ TOnDynamicAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
26
28
  TOnServer extends undefined | FormAsyncValidateOrFn<TFormData>,
27
29
  TSubmitMeta,
28
30
  > extends FormOptions<
@@ -34,6 +36,8 @@ interface CreateServerValidateOptions<
34
36
  TOnBlurAsync,
35
37
  TOnSubmit,
36
38
  TOnSubmitAsync,
39
+ TOnDynamic,
40
+ TOnDynamicAsync,
37
41
  TOnServer,
38
42
  TSubmitMeta
39
43
  > {
@@ -50,6 +54,8 @@ export const createServerValidate =
50
54
  TOnBlurAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
51
55
  TOnSubmit extends undefined | FormValidateOrFn<TFormData>,
52
56
  TOnSubmitAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
57
+ TOnDynamic extends undefined | FormValidateOrFn<TFormData>,
58
+ TOnDynamicAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
53
59
  TOnServer extends undefined | FormAsyncValidateOrFn<TFormData>,
54
60
  TSubmitMeta,
55
61
  >(
@@ -62,6 +68,8 @@ export const createServerValidate =
62
68
  TOnBlurAsync,
63
69
  TOnSubmit,
64
70
  TOnSubmitAsync,
71
+ TOnDynamic,
72
+ TOnDynamicAsync,
65
73
  TOnServer,
66
74
  TSubmitMeta
67
75
  >,
@@ -13,6 +13,8 @@ export type ServerFormState<
13
13
  undefined,
14
14
  undefined,
15
15
  undefined,
16
+ undefined,
17
+ undefined,
16
18
  TOnServer
17
19
  >,
18
20
  'values' | 'errors' | 'errorMap'
@@ -25,6 +25,8 @@ interface CreateServerValidateOptions<
25
25
  TOnBlurAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
26
26
  TOnSubmit extends undefined | FormValidateOrFn<TFormData>,
27
27
  TOnSubmitAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
28
+ TOnDynamic extends undefined | FormValidateOrFn<TFormData>,
29
+ TOnDynamicAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
28
30
  TOnServer extends undefined | FormAsyncValidateOrFn<TFormData>,
29
31
  TSubmitMeta,
30
32
  > extends FormOptions<
@@ -36,6 +38,8 @@ interface CreateServerValidateOptions<
36
38
  TOnBlurAsync,
37
39
  TOnSubmit,
38
40
  TOnSubmitAsync,
41
+ TOnDynamic,
42
+ TOnDynamicAsync,
39
43
  TOnServer,
40
44
  TSubmitMeta
41
45
  > {
@@ -52,6 +56,8 @@ export const createServerValidate =
52
56
  TOnBlurAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
53
57
  TOnSubmit extends undefined | FormValidateOrFn<TFormData>,
54
58
  TOnSubmitAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
59
+ TOnDynamic extends undefined | FormValidateOrFn<TFormData>,
60
+ TOnDynamicAsync extends undefined | FormAsyncValidateOrFn<TFormData>,
55
61
  TOnServer extends undefined | FormAsyncValidateOrFn<TFormData>,
56
62
  TSubmitMeta,
57
63
  >(
@@ -64,6 +70,8 @@ export const createServerValidate =
64
70
  TOnBlurAsync,
65
71
  TOnSubmit,
66
72
  TOnSubmitAsync,
73
+ TOnDynamic,
74
+ TOnDynamicAsync,
67
75
  TOnServer,
68
76
  TSubmitMeta
69
77
  >,
@@ -13,6 +13,8 @@ export type ServerFormState<
13
13
  undefined,
14
14
  undefined,
15
15
  undefined,
16
+ undefined,
17
+ undefined,
16
18
  TOnServer
17
19
  >,
18
20
  'values' | 'errors' | 'errorMap'
package/src/types.ts CHANGED
@@ -33,6 +33,10 @@ export interface UseFieldOptions<
33
33
  TOnSubmitAsync extends
34
34
  | undefined
35
35
  | FieldAsyncValidateOrFn<TParentData, TName, TData>,
36
+ TOnDynamic extends undefined | FieldValidateOrFn<TParentData, TName, TData>,
37
+ TOnDynamicAsync extends
38
+ | undefined
39
+ | FieldAsyncValidateOrFn<TParentData, TName, TData>,
36
40
  TFormOnMount extends undefined | FormValidateOrFn<TParentData>,
37
41
  TFormOnChange extends undefined | FormValidateOrFn<TParentData>,
38
42
  TFormOnChangeAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
@@ -40,6 +44,8 @@ export interface UseFieldOptions<
40
44
  TFormOnBlurAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
41
45
  TFormOnSubmit extends undefined | FormValidateOrFn<TParentData>,
42
46
  TFormOnSubmitAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
47
+ TFormOnDynamic extends undefined | FormValidateOrFn<TParentData>,
48
+ TFormOnDynamicAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
43
49
  TFormOnServer extends undefined | FormAsyncValidateOrFn<TParentData>,
44
50
  TSubmitMeta,
45
51
  > extends FieldApiOptions<
@@ -53,6 +59,8 @@ export interface UseFieldOptions<
53
59
  TOnBlurAsync,
54
60
  TOnSubmit,
55
61
  TOnSubmitAsync,
62
+ TOnDynamic,
63
+ TOnDynamicAsync,
56
64
  TFormOnMount,
57
65
  TFormOnChange,
58
66
  TFormOnChangeAsync,
@@ -60,6 +68,8 @@ export interface UseFieldOptions<
60
68
  TFormOnBlurAsync,
61
69
  TFormOnSubmit,
62
70
  TFormOnSubmitAsync,
71
+ TFormOnDynamic,
72
+ TFormOnDynamicAsync,
63
73
  TFormOnServer,
64
74
  TSubmitMeta
65
75
  >,
@@ -82,6 +92,10 @@ export interface UseFieldOptionsBound<
82
92
  TOnSubmitAsync extends
83
93
  | undefined
84
94
  | FieldAsyncValidateOrFn<TParentData, TName, TData>,
95
+ TOnDynamic extends undefined | FieldValidateOrFn<TParentData, TName, TData>,
96
+ TOnDynamicAsync extends
97
+ | undefined
98
+ | FieldAsyncValidateOrFn<TParentData, TName, TData>,
85
99
  > extends FieldOptions<
86
100
  TParentData,
87
101
  TName,
@@ -92,6 +106,8 @@ export interface UseFieldOptionsBound<
92
106
  TOnBlur,
93
107
  TOnBlurAsync,
94
108
  TOnSubmit,
95
- TOnSubmitAsync
109
+ TOnSubmitAsync,
110
+ TOnDynamic,
111
+ TOnDynamicAsync
96
112
  >,
97
113
  FieldOptionsMode {}
package/src/useField.tsx CHANGED
@@ -22,6 +22,8 @@ interface ReactFieldApi<
22
22
  TFormOnBlurAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
23
23
  TFormOnSubmit extends undefined | FormValidateOrFn<TParentData>,
24
24
  TFormOnSubmitAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
25
+ TFormOnDynamic extends undefined | FormValidateOrFn<TParentData>,
26
+ TFormOnDynamicAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
25
27
  TFormOnServer extends undefined | FormAsyncValidateOrFn<TParentData>,
26
28
  TPatentSubmitMeta,
27
29
  > {
@@ -37,6 +39,8 @@ interface ReactFieldApi<
37
39
  TFormOnBlurAsync,
38
40
  TFormOnSubmit,
39
41
  TFormOnSubmitAsync,
42
+ TFormOnDynamic,
43
+ TFormOnDynamicAsync,
40
44
  TFormOnServer,
41
45
  TPatentSubmitMeta
42
46
  >
@@ -56,6 +60,8 @@ export type UseField<
56
60
  TFormOnBlurAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
57
61
  TFormOnSubmit extends undefined | FormValidateOrFn<TParentData>,
58
62
  TFormOnSubmitAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
63
+ TFormOnDynamic extends undefined | FormValidateOrFn<TParentData>,
64
+ TFormOnDynamicAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
59
65
  TFormOnServer extends undefined | FormAsyncValidateOrFn<TParentData>,
60
66
  TPatentSubmitMeta,
61
67
  > = <
@@ -74,6 +80,10 @@ export type UseField<
74
80
  TOnSubmitAsync extends
75
81
  | undefined
76
82
  | FieldAsyncValidateOrFn<TParentData, TName, TData>,
83
+ TOnDynamic extends undefined | FieldValidateOrFn<TParentData, TName, TData>,
84
+ TOnDynamicAsync extends
85
+ | undefined
86
+ | FieldAsyncValidateOrFn<TParentData, TName, TData>,
77
87
  >(
78
88
  opts: UseFieldOptionsBound<
79
89
  TParentData,
@@ -85,7 +95,9 @@ export type UseField<
85
95
  TOnBlur,
86
96
  TOnBlurAsync,
87
97
  TOnSubmit,
88
- TOnSubmitAsync
98
+ TOnSubmitAsync,
99
+ TOnDynamic,
100
+ TOnDynamicAsync
89
101
  >,
90
102
  ) => FieldApi<
91
103
  TParentData,
@@ -98,6 +110,8 @@ export type UseField<
98
110
  TOnBlurAsync,
99
111
  TOnSubmit,
100
112
  TOnSubmitAsync,
113
+ TOnDynamic,
114
+ TOnDynamicAsync,
101
115
  TFormOnMount,
102
116
  TFormOnChange,
103
117
  TFormOnChangeAsync,
@@ -105,6 +119,8 @@ export type UseField<
105
119
  TFormOnBlurAsync,
106
120
  TFormOnSubmit,
107
121
  TFormOnSubmitAsync,
122
+ TFormOnDynamic,
123
+ TFormOnDynamicAsync,
108
124
  TFormOnServer,
109
125
  TPatentSubmitMeta
110
126
  >
@@ -132,6 +148,10 @@ export function useField<
132
148
  TOnSubmitAsync extends
133
149
  | undefined
134
150
  | FieldAsyncValidateOrFn<TParentData, TName, TData>,
151
+ TOnDynamic extends undefined | FieldValidateOrFn<TParentData, TName, TData>,
152
+ TOnDynamicAsync extends
153
+ | undefined
154
+ | FieldAsyncValidateOrFn<TParentData, TName, TData>,
135
155
  TFormOnMount extends undefined | FormValidateOrFn<TParentData>,
136
156
  TFormOnChange extends undefined | FormValidateOrFn<TParentData>,
137
157
  TFormOnChangeAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
@@ -139,6 +159,8 @@ export function useField<
139
159
  TFormOnBlurAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
140
160
  TFormOnSubmit extends undefined | FormValidateOrFn<TParentData>,
141
161
  TFormOnSubmitAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
162
+ TFormOnDynamic extends undefined | FormValidateOrFn<TParentData>,
163
+ TFormOnDynamicAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
142
164
  TFormOnServer extends undefined | FormAsyncValidateOrFn<TParentData>,
143
165
  TPatentSubmitMeta,
144
166
  >(
@@ -153,6 +175,8 @@ export function useField<
153
175
  TOnBlurAsync,
154
176
  TOnSubmit,
155
177
  TOnSubmitAsync,
178
+ TOnDynamic,
179
+ TOnDynamicAsync,
156
180
  TFormOnMount,
157
181
  TFormOnChange,
158
182
  TFormOnChangeAsync,
@@ -160,6 +184,8 @@ export function useField<
160
184
  TFormOnBlurAsync,
161
185
  TFormOnSubmit,
162
186
  TFormOnSubmitAsync,
187
+ TFormOnDynamic,
188
+ TFormOnDynamicAsync,
163
189
  TFormOnServer,
164
190
  TPatentSubmitMeta
165
191
  >,
@@ -181,6 +207,8 @@ export function useField<
181
207
  TFormOnBlurAsync,
182
208
  TFormOnSubmit,
183
209
  TFormOnSubmitAsync,
210
+ TFormOnDynamic,
211
+ TFormOnDynamicAsync,
184
212
  TFormOnServer,
185
213
  TPatentSubmitMeta
186
214
  > = api as never
@@ -235,6 +263,10 @@ interface FieldComponentProps<
235
263
  TOnSubmitAsync extends
236
264
  | undefined
237
265
  | FieldAsyncValidateOrFn<TParentData, TName, TData>,
266
+ TOnDynamic extends undefined | FieldValidateOrFn<TParentData, TName, TData>,
267
+ TOnDynamicAsync extends
268
+ | undefined
269
+ | FieldAsyncValidateOrFn<TParentData, TName, TData>,
238
270
  TFormOnMount extends undefined | FormValidateOrFn<TParentData>,
239
271
  TFormOnChange extends undefined | FormValidateOrFn<TParentData>,
240
272
  TFormOnChangeAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
@@ -242,6 +274,8 @@ interface FieldComponentProps<
242
274
  TFormOnBlurAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
243
275
  TFormOnSubmit extends undefined | FormValidateOrFn<TParentData>,
244
276
  TFormOnSubmitAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
277
+ TFormOnDynamic extends undefined | FormValidateOrFn<TParentData>,
278
+ TFormOnDynamicAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
245
279
  TFormOnServer extends undefined | FormAsyncValidateOrFn<TParentData>,
246
280
  TPatentSubmitMeta,
247
281
  ExtendedApi = {},
@@ -256,6 +290,8 @@ interface FieldComponentProps<
256
290
  TOnBlurAsync,
257
291
  TOnSubmit,
258
292
  TOnSubmitAsync,
293
+ TOnDynamic,
294
+ TOnDynamicAsync,
259
295
  TFormOnMount,
260
296
  TFormOnChange,
261
297
  TFormOnChangeAsync,
@@ -263,6 +299,8 @@ interface FieldComponentProps<
263
299
  TFormOnBlurAsync,
264
300
  TFormOnSubmit,
265
301
  TFormOnSubmitAsync,
302
+ TFormOnDynamic,
303
+ TFormOnDynamicAsync,
266
304
  TFormOnServer,
267
305
  TPatentSubmitMeta
268
306
  > {
@@ -278,6 +316,8 @@ interface FieldComponentProps<
278
316
  TOnBlurAsync,
279
317
  TOnSubmit,
280
318
  TOnSubmitAsync,
319
+ TOnDynamic,
320
+ TOnDynamicAsync,
281
321
  TFormOnMount,
282
322
  TFormOnChange,
283
323
  TFormOnChangeAsync,
@@ -285,6 +325,8 @@ interface FieldComponentProps<
285
325
  TFormOnBlurAsync,
286
326
  TFormOnSubmit,
287
327
  TFormOnSubmitAsync,
328
+ TFormOnDynamic,
329
+ TFormOnDynamicAsync,
288
330
  TFormOnServer,
289
331
  TPatentSubmitMeta
290
332
  > &
@@ -309,6 +351,10 @@ interface FieldComponentBoundProps<
309
351
  TOnSubmitAsync extends
310
352
  | undefined
311
353
  | FieldAsyncValidateOrFn<TParentData, TName, TData>,
354
+ TOnDynamic extends undefined | FieldValidateOrFn<TParentData, TName, TData>,
355
+ TOnDynamicAsync extends
356
+ | undefined
357
+ | FieldAsyncValidateOrFn<TParentData, TName, TData>,
312
358
  TFormOnMount extends undefined | FormValidateOrFn<TParentData>,
313
359
  TFormOnChange extends undefined | FormValidateOrFn<TParentData>,
314
360
  TFormOnChangeAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
@@ -316,6 +362,8 @@ interface FieldComponentBoundProps<
316
362
  TFormOnBlurAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
317
363
  TFormOnSubmit extends undefined | FormValidateOrFn<TParentData>,
318
364
  TFormOnSubmitAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
365
+ TFormOnDynamic extends undefined | FormValidateOrFn<TParentData>,
366
+ TFormOnDynamicAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
319
367
  TFormOnServer extends undefined | FormAsyncValidateOrFn<TParentData>,
320
368
  TPatentSubmitMeta,
321
369
  ExtendedApi = {},
@@ -329,7 +377,9 @@ interface FieldComponentBoundProps<
329
377
  TOnBlur,
330
378
  TOnBlurAsync,
331
379
  TOnSubmit,
332
- TOnSubmitAsync
380
+ TOnSubmitAsync,
381
+ TOnDynamic,
382
+ TOnDynamicAsync
333
383
  > {
334
384
  children: (
335
385
  fieldApi: FieldApi<
@@ -343,6 +393,8 @@ interface FieldComponentBoundProps<
343
393
  TOnBlurAsync,
344
394
  TOnSubmit,
345
395
  TOnSubmitAsync,
396
+ TOnDynamic,
397
+ TOnDynamicAsync,
346
398
  TFormOnMount,
347
399
  TFormOnChange,
348
400
  TFormOnChangeAsync,
@@ -350,6 +402,8 @@ interface FieldComponentBoundProps<
350
402
  TFormOnBlurAsync,
351
403
  TFormOnSubmit,
352
404
  TFormOnSubmitAsync,
405
+ TFormOnDynamic,
406
+ TFormOnDynamicAsync,
353
407
  TFormOnServer,
354
408
  TPatentSubmitMeta
355
409
  > &
@@ -375,6 +429,10 @@ export type FieldComponent<
375
429
  in out TFormOnSubmitAsync extends
376
430
  | undefined
377
431
  | FormAsyncValidateOrFn<TParentData>,
432
+ in out TFormOnDynamic extends undefined | FormValidateOrFn<TParentData>,
433
+ in out TFormOnDynamicAsync extends
434
+ | undefined
435
+ | FormAsyncValidateOrFn<TParentData>,
378
436
  in out TFormOnServer extends undefined | FormAsyncValidateOrFn<TParentData>,
379
437
  in out TPatentSubmitMeta,
380
438
  in out ExtendedApi = {},
@@ -394,6 +452,10 @@ export type FieldComponent<
394
452
  TOnSubmitAsync extends
395
453
  | undefined
396
454
  | FieldAsyncValidateOrFn<TParentData, TName, TData>,
455
+ TOnDynamic extends undefined | FieldValidateOrFn<TParentData, TName, TData>,
456
+ TOnDynamicAsync extends
457
+ | undefined
458
+ | FieldAsyncValidateOrFn<TParentData, TName, TData>,
397
459
  >({
398
460
  children,
399
461
  ...fieldOptions
@@ -408,6 +470,8 @@ export type FieldComponent<
408
470
  TOnBlurAsync,
409
471
  TOnSubmit,
410
472
  TOnSubmitAsync,
473
+ TOnDynamic,
474
+ TOnDynamicAsync,
411
475
  TFormOnMount,
412
476
  TFormOnChange,
413
477
  TFormOnChangeAsync,
@@ -415,6 +479,8 @@ export type FieldComponent<
415
479
  TFormOnBlurAsync,
416
480
  TFormOnSubmit,
417
481
  TFormOnSubmitAsync,
482
+ TFormOnDynamic,
483
+ TFormOnDynamicAsync,
418
484
  TFormOnServer,
419
485
  TPatentSubmitMeta,
420
486
  ExtendedApi
@@ -443,6 +509,10 @@ export type LensFieldComponent<
443
509
  TOnSubmitAsync extends
444
510
  | undefined
445
511
  | FieldAsyncValidateOrFn<unknown, string, TData>,
512
+ TOnDynamic extends undefined | FieldValidateOrFn<unknown, string, TData>,
513
+ TOnDynamicAsync extends
514
+ | undefined
515
+ | FieldAsyncValidateOrFn<unknown, string, TData>,
446
516
  >({
447
517
  children,
448
518
  ...fieldOptions
@@ -457,7 +527,11 @@ export type LensFieldComponent<
457
527
  TOnBlurAsync,
458
528
  TOnSubmit,
459
529
  TOnSubmitAsync,
530
+ TOnDynamic,
531
+ TOnDynamicAsync,
532
+ undefined | FormValidateOrFn<unknown>,
460
533
  undefined | FormValidateOrFn<unknown>,
534
+ undefined | FormAsyncValidateOrFn<unknown>,
461
535
  undefined | FormValidateOrFn<unknown>,
462
536
  undefined | FormAsyncValidateOrFn<unknown>,
463
537
  undefined | FormValidateOrFn<unknown>,
@@ -491,6 +565,10 @@ export const Field = (<
491
565
  TOnSubmitAsync extends
492
566
  | undefined
493
567
  | FieldAsyncValidateOrFn<TParentData, TName, TData>,
568
+ TOnDynamic extends undefined | FieldValidateOrFn<TParentData, TName, TData>,
569
+ TOnDynamicAsync extends
570
+ | undefined
571
+ | FieldAsyncValidateOrFn<TParentData, TName, TData>,
494
572
  TFormOnMount extends undefined | FormValidateOrFn<TParentData>,
495
573
  TFormOnChange extends undefined | FormValidateOrFn<TParentData>,
496
574
  TFormOnChangeAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
@@ -498,6 +576,8 @@ export const Field = (<
498
576
  TFormOnBlurAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
499
577
  TFormOnSubmit extends undefined | FormValidateOrFn<TParentData>,
500
578
  TFormOnSubmitAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
579
+ TFormOnDynamic extends undefined | FormValidateOrFn<TParentData>,
580
+ TFormOnDynamicAsync extends undefined | FormAsyncValidateOrFn<TParentData>,
501
581
  TFormOnServer extends undefined | FormAsyncValidateOrFn<TParentData>,
502
582
  TPatentSubmitMeta,
503
583
  >({
@@ -514,6 +594,8 @@ export const Field = (<
514
594
  TOnBlurAsync,
515
595
  TOnSubmit,
516
596
  TOnSubmitAsync,
597
+ TOnDynamic,
598
+ TOnDynamicAsync,
517
599
  TFormOnMount,
518
600
  TFormOnChange,
519
601
  TFormOnChangeAsync,
@@ -521,6 +603,8 @@ export const Field = (<
521
603
  TFormOnBlurAsync,
522
604
  TFormOnSubmit,
523
605
  TFormOnSubmitAsync,
606
+ TFormOnDynamic,
607
+ TFormOnDynamicAsync,
524
608
  TFormOnServer,
525
609
  TPatentSubmitMeta
526
610
  >): ReactNode => {
@@ -557,6 +641,10 @@ export const Field = (<
557
641
  any,
558
642
  any,
559
643
  any,
644
+ any,
645
+ any,
646
+ any,
647
+ any,
560
648
  any
561
649
  >
562
650
  >