Skip to content

️ deps: Bump react-hook-form from 7.23.0 to 7.26.0

Yogi Bot requested to merge dependabot-npm_and_yarn-react-hook-form-7.26.0 into main

Bumps react-hook-form from 7.23.0 to 7.26.0.

Release notes

Sourced from react-hook-form's releases.

Version 7.26.0

📚 TSDoc

https://user-images.githubusercontent.com/10513364/152477495-7df7269c-18c2-4420-85e7-956c7c35ca42.mp4

🐞 fix react-hook-form/react-hook-form#7741 is validating reset when async validations are still running (react-hook-form/react-hook-form#7747) close react-hook-form/react-hook-form#7717 shallow clone errors object in handleSubmit (react-hook-form/react-hook-form#7718) 🍦 close react-hook-form/react-hook-form#7703 don't expose internal state in handleSubmit (react-hook-form/react-hook-form#7704) 🏋️ save bytes on parseFloat (react-hook-form/react-hook-form#7697)

thanks to @​Moshyfawn and @​tiii

Version 7.25.3

😭 close #7686 regression on replace API and cloneObject on payload (#7687)

Version 7.25.2

️ close #7683 support preact with onTouched mode (#7684)

thanks to @​Moshyfawn

Version 7.25.1

🐞 fix #7662 issue with reset file input (#7656) 🚗 improve perf with get proxy formState (#7655) 🏋️ remove redundant check (#7651) 🐞 fix #7648 Unable to setFocus to Controller after reset (#7649) 🐞 fix: getFieldState - error might be undefined (#7636) improve useFieldArray code consistency (#7628)

thanks to @​Moshyfawn and @​michalbundyra

Version 7.25.0

new getFieldState API: get individual field state

Documentation: https://react-hook-form.com/api/useform/getfieldstate

import * as React from "react";
import { useForm } from "react-hook-form";
export default function App() {
const {
register,
getFieldState,
formState: { isDirty, isValid }
} = useForm({
mode: "onChange",
defaultValues: {
</tr></table>

... (truncated)

Changelog

Sourced from react-hook-form's changelog.

Changelog

[7.25.2] - 2022-1-29

Changed

  • onTouched mode will honor focusout event

[7.25.0] - 2022-1-22

Added

  • getFieldState get individual field state
export default function App() {
  const {
    register,
    getFieldState,
    formState: { isDirty, isValid },
  } = useForm({
    mode: 'onChange',
    defaultValues: {
      firstName: '',
    },
  });
// you can invoke before render or within the render function
const fieldState = getFieldState('firstName');
return (
<form>
<input {...register('firstName', { required: true })} />
<p>{getFieldState('firstName').isDirty && 'dirty'}</p>
<p>{getFieldState('firstName').isTouched && 'touched'}</p>
<button
type="button"
onClick={() => console.log(getFieldState('firstName'))}
>
field state
</button>
</form>
);
}

[7.24.0] - 2022-1-14

Changed

... (truncated)

Commits

Merge request reports