Skip to content

react-hook-form 7.31.0

[7.31.0] - 2022-5-11

Added

  • new: reset optional prop: keepDirtyValues
reset(
  {
    firstName: 'bill', // if firstName is dirty then the value will be retained
    lastName: 'luo',
  },
  { keepDirtyValues: true }, // keep any changed field
);

Changed

  • useFieldArray auto-correct field array errors on user action
const { append } = useFieldArray();

append({ data: '' }); // will auto correct existing field array errors if any