react-hook-form 7.82.0 → 7.83.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.
- package/README.md +2 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.mjs +37 -23
- package/dist/index.esm.mjs.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/logic/createFormControl.d.ts.map +1 -1
- package/dist/logic/getEventValue.d.ts.map +1 -1
- package/dist/logic/getValueAndMessage.d.ts +1 -4
- package/dist/logic/getValueAndMessage.d.ts.map +1 -1
- package/dist/react-server.esm.mjs +30 -16
- package/dist/react-server.esm.mjs.map +1 -1
- package/dist/types/errors.d.ts +2 -2
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/form.d.ts +57 -57
- package/dist/types/path/common.d.ts +6 -0
- package/dist/types/path/common.d.ts.map +1 -1
- package/dist/types/path/eager.d.ts +15 -11
- package/dist/types/path/eager.d.ts.map +1 -1
- package/dist/types/utils.d.ts +1 -1
- package/dist/types/utils.d.ts.map +1 -1
- package/dist/types/validator.d.ts +1 -1
- package/dist/types/validator.d.ts.map +1 -1
- package/dist/types/watch.d.ts +1 -1
- package/dist/types/watch.d.ts.map +1 -1
- package/dist/useFormState.d.ts +2 -2
- package/dist/useWatch.d.ts +14 -14
- package/package.json +1 -1
package/dist/useWatch.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { Control, DeepPartialSkipArrayKey, FieldPath, FieldPathValue, FieldPathValues, FieldValues } from './types';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Subscribes to all form value changes and re-renders at the hook level.
|
|
4
4
|
*
|
|
5
5
|
* @remarks
|
|
6
6
|
*
|
|
7
7
|
* [API](https://react-hook-form.com/docs/usewatch) • [Demo](https://codesandbox.io/s/react-hook-form-v7-ts-usewatch-h9i5e)
|
|
8
8
|
*
|
|
9
|
-
* @param props -
|
|
9
|
+
* @param props - DefaultValue, disabled subscription, and exact name matching.
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
12
|
* ```tsx
|
|
@@ -29,13 +29,13 @@ export declare function useWatch<TFieldValues extends FieldValues = FieldValues,
|
|
|
29
29
|
compute?: undefined;
|
|
30
30
|
}): DeepPartialSkipArrayKey<TFieldValues>;
|
|
31
31
|
/**
|
|
32
|
-
* Custom hook to subscribe to field
|
|
32
|
+
* Custom hook to subscribe to field changes and isolate re-rendering at the component level.
|
|
33
33
|
*
|
|
34
34
|
* @remarks
|
|
35
35
|
*
|
|
36
36
|
* [API](https://react-hook-form.com/docs/usewatch) • [Demo](https://codesandbox.io/s/react-hook-form-v7-ts-usewatch-h9i5e)
|
|
37
37
|
*
|
|
38
|
-
* @param props -
|
|
38
|
+
* @param props - DefaultValue, disabled subscription, and exact name matching.
|
|
39
39
|
*
|
|
40
40
|
* @example
|
|
41
41
|
* ```tsx
|
|
@@ -57,13 +57,13 @@ export declare function useWatch<TFieldValues extends FieldValues = FieldValues,
|
|
|
57
57
|
compute?: undefined;
|
|
58
58
|
}): FieldPathValue<TFieldValues, TFieldName>;
|
|
59
59
|
/**
|
|
60
|
-
* Custom hook to subscribe to field
|
|
60
|
+
* Custom hook to subscribe to field changes and use a compute function to produce state updates.
|
|
61
61
|
*
|
|
62
62
|
* @remarks
|
|
63
63
|
*
|
|
64
64
|
* [API](https://react-hook-form.com/docs/usewatch)
|
|
65
65
|
*
|
|
66
|
-
* @param props -
|
|
66
|
+
* @param props - DefaultValue, disabled subscription, and exact name matching.
|
|
67
67
|
*
|
|
68
68
|
* @example
|
|
69
69
|
* ```tsx
|
|
@@ -83,13 +83,13 @@ export declare function useWatch<TFieldValues extends FieldValues = FieldValues,
|
|
|
83
83
|
compute: (formValues: TFieldValues) => TComputeValue;
|
|
84
84
|
}): TComputeValue;
|
|
85
85
|
/**
|
|
86
|
-
* Custom hook to subscribe to field
|
|
86
|
+
* Custom hook to subscribe to field changes and use a compute function to produce state updates.
|
|
87
87
|
*
|
|
88
88
|
* @remarks
|
|
89
89
|
*
|
|
90
90
|
* [API](https://react-hook-form.com/docs/usewatch)
|
|
91
91
|
*
|
|
92
|
-
* @param props -
|
|
92
|
+
* @param props - DefaultValue, disabled subscription, and exact name matching.
|
|
93
93
|
*
|
|
94
94
|
* @example
|
|
95
95
|
* ```tsx
|
|
@@ -112,13 +112,13 @@ export declare function useWatch<TFieldValues extends FieldValues = FieldValues,
|
|
|
112
112
|
compute: (fieldValue: FieldPathValue<TFieldValues, TFieldName>) => TComputeValue;
|
|
113
113
|
}): TComputeValue;
|
|
114
114
|
/**
|
|
115
|
-
* Custom hook to subscribe to field
|
|
115
|
+
* Custom hook to subscribe to field changes and isolate re-rendering at the component level.
|
|
116
116
|
*
|
|
117
117
|
* @remarks
|
|
118
118
|
*
|
|
119
119
|
* [API](https://react-hook-form.com/docs/usewatch) • [Demo](https://codesandbox.io/s/react-hook-form-v7-ts-usewatch-h9i5e)
|
|
120
120
|
*
|
|
121
|
-
* @param props -
|
|
121
|
+
* @param props - DefaultValue, disabled subscription, and exact name matching.
|
|
122
122
|
*
|
|
123
123
|
* @example
|
|
124
124
|
* ```tsx
|
|
@@ -143,13 +143,13 @@ export declare function useWatch<TFieldValues extends FieldValues = FieldValues,
|
|
|
143
143
|
compute?: undefined;
|
|
144
144
|
}): FieldPathValues<TFieldValues, TFieldNames>;
|
|
145
145
|
/**
|
|
146
|
-
* Custom hook to subscribe to field
|
|
146
|
+
* Custom hook to subscribe to field changes and use a compute function to produce state updates.
|
|
147
147
|
*
|
|
148
148
|
* @remarks
|
|
149
149
|
*
|
|
150
150
|
* [API](https://react-hook-form.com/docs/usewatch)
|
|
151
151
|
*
|
|
152
|
-
* @param props -
|
|
152
|
+
* @param props - DefaultValue, disabled subscription, and exact name matching.
|
|
153
153
|
*
|
|
154
154
|
* @example
|
|
155
155
|
* ```tsx
|
|
@@ -175,7 +175,7 @@ export declare function useWatch<TFieldValues extends FieldValues = FieldValues,
|
|
|
175
175
|
compute: (fieldValue: FieldPathValues<TFieldValues, TFieldNames>) => TComputeValue;
|
|
176
176
|
}): TComputeValue;
|
|
177
177
|
/**
|
|
178
|
-
* Custom hook to subscribe to field
|
|
178
|
+
* Custom hook to subscribe to field changes and isolate re-rendering at the component level.
|
|
179
179
|
*
|
|
180
180
|
* @remarks
|
|
181
181
|
*
|
|
@@ -183,7 +183,7 @@ export declare function useWatch<TFieldValues extends FieldValues = FieldValues,
|
|
|
183
183
|
*
|
|
184
184
|
* @example
|
|
185
185
|
* ```tsx
|
|
186
|
-
* //
|
|
186
|
+
* // Can skip passing down the control into useWatch if the form is wrapped with FormProvider
|
|
187
187
|
* const values = useWatch()
|
|
188
188
|
* ```
|
|
189
189
|
*/
|
package/package.json
CHANGED