react-hook-form 7.31.0
[7.31.0] - 2022-5-11
Added
- new:
resetoptional prop:keepDirtyValues
reset(
{
firstName: 'bill', // if firstName is dirty then the value will be retained
lastName: 'luo',
},
{ keepDirtyValues: true }, // keep any changed field
);
Changed
useFieldArrayauto-correct field array errors on user action
const { append } = useFieldArray();
append({ data: '' }); // will auto correct existing field array errors if any