π [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)