diff --git a/packages/design-docs/package.json b/packages/design-docs/package.json index 5f38cebca52..0ce550566c8 100644 --- a/packages/design-docs/package.json +++ b/packages/design-docs/package.json @@ -31,7 +31,7 @@ "classnames": "^2.3.1", "color-contrast-checker": "^2.1.0", "figma-js": "^1.16.0", - "react-hook-form": "^6.15.8", + "react-hook-form": "^7.47.0", "react": "^17.0.2", "react-dom": "^17.0.2", "use-overflow": "^1.2.0" diff --git a/packages/forms/package.json b/packages/forms/package.json index b0ba146a647..5440a6616c3 100644 --- a/packages/forms/package.json +++ b/packages/forms/package.json @@ -51,7 +51,7 @@ "react-autowhatever": "10.2.0", "@talend/react-bootstrap": "^1.35.2", "react-ace": "10.1.0", - "react-hook-form": "^6.15.8", + "react-hook-form": "^7.47.0", "react-jsonschema-form": "0.51.0", "tv4": "^1.3.0" }, diff --git a/packages/stepper/src/stories/Stepper.components.tsx b/packages/stepper/src/stories/Stepper.components.tsx index 3d2122e370c..3e48138a684 100644 --- a/packages/stepper/src/stories/Stepper.components.tsx +++ b/packages/stepper/src/stories/Stepper.components.tsx @@ -20,7 +20,7 @@ export const FormComponentStep1 = () => { defaultValues: { ...stepsData[0] }, }); - const { field, meta } = useController({ + const { field, fieldState } = useController({ control: rhf.control, name: 'randomInput', rules: { @@ -63,7 +63,7 @@ export const FormComponentStep1 = () => { }} /> - {meta.invalid && ( + {fieldState.invalid && ( )} { defaultValues: { ...stepsData[1] }, }); - const { field, meta } = useController({ + const { field, fieldState } = useController({ control: rhf.control, name: 'randomInput', rules: { @@ -124,7 +124,7 @@ export const FormComponentStep2 = () => { }} /> - {meta.invalid && ( + {fieldState.invalid && ( )} { defaultValues: { ...stepsData[2] }, }); - const { field, meta } = useController({ + const { field, fieldState } = useController({ control: rhf.control, name: 'randomInput', rules: { @@ -171,7 +171,7 @@ export const FormComponentStep3 = () => {
- {meta.invalid && ( + {fieldState.invalid && ( )}