Skip to content

️ deps: Bump react-hook-form from 7.26.1 to 7.28.0

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

Bumps react-hook-form from 7.26.1 to 7.28.0.

Release notes

Sourced from react-hook-form's releases.

Version 7.28.0

🏬 enable deps with string syntax (react-hook-form/react-hook-form#7901)

register('test', { deps: 'theOtherInput' })
register('test', { deps: ['theOtherInput', 'others'] })

🧷 fix field array update to avoid external mutation 🐞 fix react-hook-form/react-hook-form#7960 issue on unset deeply nested array field (react-hook-form/react-hook-form#7961) 🐞 fix react-hook-form/react-hook-form#7958 issue with checkbox plus portal (react-hook-form/react-hook-form#7959) 📦 unpack blob data type (react-hook-form/react-hook-form#7937)

thanks to @​DASPRiD and @​Moshyfawn

Version 7.28.0-next.0

🏬 enable deps with string syntax (react-hook-form/react-hook-form#7901)

register('test', { deps: 'theOtherInput' })

🧷 fix field array update to avoid external mutation

Version 7.27.1

🐛 fix react-hook-form/react-hook-form#7853 (useFieldArray): pass context type down to Control (react-hook-form/react-hook-form#7856) 🐞 fix react-hook-form/react-hook-form#7849 issue with unset on multiple dimension array (react-hook-form/react-hook-form#7859)

thanks to @​Moshyfawn

Version 7.27.0

react-hook-form/react-hook-form#7138 feature: allow selecting input's content on focus (react-hook-form/react-hook-form#7781)

setFocus('fieldName', { shouldSelect: true })

https://user-images.githubusercontent.com/10513364/153570934-ca29337f-d7ce-4744-b282-6939c2e17b48.mp4

️ fix react-hook-form/react-hook-form#7772 type issue by using UnpackNestedValue on FieldArray methods (react-hook-form/react-hook-form#7773)

thanks to @​Moshyfawn and @​hpersson

Changelog

Sourced from react-hook-form's changelog.

[7.28.0] - 2022-3-13

  • register API options deps now support string
register('test', { dpes: 'test' });

[7.27.0] - 2022-2-11

Added

  • new option for setFocus to select the entire field value
setFocus('fieldName', { shouldSelect: true });

[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>
</tr></table>

... (truncated)

Commits

Merge request reports

Loading