@@ -11,14 +11,14 @@ Normally, you will not need to create a new `FieldApi` instance directly. Instea
1111const fieldApi: FieldApi <TData > = new FieldApi (formOptions : Field Options < TData > )
1212```
1313
14- ### ` FieldOptions<TData, TFormData > `
14+ ### ` FieldOptions<TData, TParentData > `
1515
1616An object type representing the options for a field in a form.
1717
1818- ``` tsx
1919 name
2020 ```
21- - The field name. If ` TFormData ` is ` unknown ` , the type will be ` string ` . Otherwise, it will be ` DeepKeys<TFormData > ` .
21+ - The field name. If ` TParentData ` is ` unknown ` , the type will be ` string ` . Otherwise, it will be ` DeepKeys<TParentData > ` .
2222- ``` tsx
2323 defaultValue ?: TData
2424 ```
@@ -30,19 +30,19 @@ An object type representing the options for a field in a form.
3030 - An optional object with default metadata for the field.
3131
3232- ``` tsx
33- onMount ?: (formApi : FieldApi <TData , TFormData >) => void
33+ onMount ?: (formApi : FieldApi <TData , TParentData >) => void
3434 ```
3535
36- - An optional function that takes a param of ` formApi ` which is a generic type of ` TData ` and ` TFormData `
36+ - An optional function that takes a param of ` formApi ` which is a generic type of ` TData ` and ` TParentData `
3737
3838- ``` tsx
39- onChange ?: ValidateFn < TData , TFormData >
39+ onChange ?: ValidateFn < TData , TParentData >
4040 ```
4141
42- - An optional property that takes a ` ValidateFn ` which is a generic of ` TData ` and ` TFormData `
42+ - An optional property that takes a ` ValidateFn ` which is a generic of ` TData ` and ` TParentData `
4343
4444- ``` tsx
45- onChangeAsync ?: ValidateAsyncFn < TData , TFormData >
45+ onChangeAsync ?: ValidateAsyncFn < TData , TParentData >
4646 ```
4747
4848 - An optional property similar to ` onChange ` but async validation
@@ -55,16 +55,16 @@ An object type representing the options for a field in a form.
5555 - If set to a number larger than 0, will debounce the async validation event by this length of time in milliseconds
5656
5757- ``` tsx
58- onBlur ?: ValidateFn < TData , TFormData >
58+ onBlur ?: ValidateFn < TData , TParentData >
5959 ```
6060
6161 - An optional function, when that run when subscribing to blur event of input
6262
6363- ``` tsx
64- onBlurAsync ?: ValidateAsyncFn < TData , TFormData >
64+ onBlurAsync ?: ValidateAsyncFn < TData , TParentData >
6565 ```
6666
67- - An optional function that takes a ` ValidateFn ` which is a generic of ` TData ` and ` TFormData ` happens async
67+ - An optional function that takes a ` ValidateFn ` which is a generic of ` TData ` and ` TParentData ` happens async
6868
6969 ``` tsx
7070 onBlurAsyncDebounceMs ?: number
@@ -110,13 +110,13 @@ An object type representing the metadata of a field in a form.
110110 ```
111111 - A flag indicating whether the field is currently being validated.
112112
113- ### ` FieldApiOptions<TData, TFormData > `
113+ ### ` FieldApiOptions<TData, TParentData > `
114114
115115An object type representing the required options for the ` FieldApi ` class.
116116
117- - Inherits from ` FieldOptions<TData, TFormData > ` with the ` form ` property set as required.
117+ - Inherits from ` FieldOptions<TData, TParentData > ` with the ` form ` property set as required.
118118
119- ### ` FieldApi<TData, TFormData > `
119+ ### ` FieldApi<TData, TParentData > `
120120
121121A class representing the API for managing a form field.
122122
@@ -127,11 +127,11 @@ A class representing the API for managing a form field.
127127 ```
128128 - A unique identifier for the field instance.
129129- ``` tsx
130- form : FormApi < TFormData >
130+ form : FormApi < TParentData >
131131 ```
132132 - A reference to the form API instance.
133133- ``` tsx
134- name : DeepKeys < TFormData >
134+ name : DeepKeys < TParentData >
135135 ```
136136 - The field name.
137137- ``` tsx
@@ -143,14 +143,14 @@ A class representing the API for managing a form field.
143143 ```
144144 - The current field state.
145145- ``` tsx
146- options : RequiredByKey < FieldOptions < TData , TFormData > , ' validateOn' >
146+ options : RequiredByKey < FieldOptions < TData , TParentData > , ' validateOn' >
147147 ```
148148 - The field options with the ` validateOn ` property set as required.
149149
150150#### Methods
151151
152152- ``` tsx
153- constructor (opts : FieldApiOptions < TData , TFormData > )
153+ constructor (opts : FieldApiOptions < TData , TParentData > )
154154 ```
155155 - Initializes a new ` FieldApi ` instance.
156156- ``` tsx
@@ -162,7 +162,7 @@ A class representing the API for managing a form field.
162162 ```
163163 - Updates the field store with the latest form state.
164164- ``` tsx
165- update (opts : FieldApiOptions < TData , TFormData > ): void
165+ update (opts : FieldApiOptions < TData , TParentData > ): void
166166 ```
167167 - Updates the field instance with new options.
168168- ``` tsx
@@ -202,7 +202,7 @@ A class representing the API for managing a form field.
202202 ```
203203 - Swaps the values at the specified indices.
204204- ``` tsx
205- getSubField <TName extends DeepKeys <TData >>(name : TName ): FieldApi <DeepValue <TData , TName >, TFormData >
205+ getSubField <TName extends DeepKeys <TData >>(name : TName ): FieldApi <DeepValue <TData , TName >, TParentData >
206206 ` ` `
207207 - Gets a subfield instance.
208208- ` ` ` tsx
0 commit comments