npm react-hook-form 7.15.0
Version 7.15.0

latest releases: 7.53.1, 7.53.0, 7.52.2...
3 years ago

πŸŽ‡ [useFieldArray] new method replace() (#6304)

const { control } = useForm({
  defaultValues: {
    test: [{ value: 'lorem' }, { value: 'ipsum' }]
  }
});
const { fields, replace } = useFieldArray({ 
  control, 
  name: 'test'
});

const handleFullyReplacement = (): void => {
  // remove old and set fully new values
  replace([{ value: 'dolor' }, { value: 'sit' }, { value: 'amet' }]);
}

🐞 fix #6379 toggle disabled props with register api (#6459)
πŸ—ΊοΈ improve Mapped types (#6451)
πŸ—οΈ refactor: improve NestedValue type (#6449)
πŸ—οΈ feat: improve PathValue type to fully support union type (#6431)

Don't miss a new react-hook-form release

NewReleases is sending notifications on new releases.