File tree Expand file tree Collapse file tree 4 files changed +9
-8
lines changed Expand file tree Collapse file tree 4 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 8181 "prettier" : " ^2.2.1" ,
8282 "react" : " ^17.0.2" ,
8383 "react-dom" : " ^17.0.2" ,
84- "react-hook-form" : " ^6.11.4 " ,
84+ "react-hook-form" : " ^7.0.5 " ,
8585 "rimraf" : " ^3.0.2" ,
8686 "ts-jest" : " ^26.5.4" ,
8787 "typescript" : " ^4.2.4"
8888 },
8989 "peerDependencies" : {
9090 "react" : " >=16.8.0" ,
9191 "react-dom" : " >=16.8.0" ,
92- "react-hook-form" : " >=6.6 .0"
92+ "react-hook-form" : " ^7.0 .0"
9393 },
9494 "husky" : {
9595 "hooks" : {
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ const ErrorMessage = <
1818 ...rest
1919} : Props < TFieldErrors , TAs > ) => {
2020 const methods = useFormContext ( ) ;
21- const error = get ( errors || methods . errors , name ) ;
21+ const error = get ( errors || methods . formState . errors , name ) ;
2222
2323 if ( ! error ) {
2424 return null ;
Original file line number Diff line number Diff line change 11import React from 'react' ;
22import {
3- Assign ,
43 FieldName ,
54 Message ,
65 MultipleFieldErrors ,
76 FieldErrors ,
87} from 'react-hook-form' ;
98
9+ type Assign < T extends object , U extends object > = T & Omit < U , keyof T > ;
10+
1011export type FieldValuesFromFieldErrors <
1112 TFieldErrors
1213> = TFieldErrors extends FieldErrors < infer TFieldValues > ? TFieldValues : never ;
Original file line number Diff line number Diff line change @@ -5784,10 +5784,10 @@ react-dom@^17.0.2:
57845784 object-assign "^4.1.1"
57855785 scheduler "^0.20.2"
57865786
5787- react-hook-form@^6.11.4 :
5788- version "6.15 .5"
5789- resolved "https://registry.yarnpkg.com/react-hook-form/-/react-hook-form-6.15 .5.tgz#c2578f9ce6a6df7b33015587d40cd880dc13e2db "
5790- integrity sha512-so2jEPYKdVk1olMo+HQ9D9n1hVzaPPFO4wsjgSeZ964R7q7CHsYRbVF0PGBi83FcycA5482WHflasdwLIUVENg ==
5787+ react-hook-form@^7.0.5 :
5788+ version "7.0 .5"
5789+ resolved "https://registry.yarnpkg.com/react-hook-form/-/react-hook-form-7.0 .5.tgz#33d4a437be78ca1fe86867ed937fe94b09c4bf9c "
5790+ integrity sha512-NERg22pjSa8URYfNhDhefGVODMTP4DMLlkK+bpuN4GUWKYIh/qiV4YmPuH8bfMAcXKj+bpdh6n7dB5B6jBs74Q ==
57915791
57925792react-is@^16.8.1 :
57935793 version "16.13.1"
You can’t perform that action at this time.
0 commit comments