Additional changes to review1 matched termMatched wording:deprecatedThese matches may be harmless in context. Expand to see the excerpts.
- The changelog mentions deprecation; it may still be compatible.
🍌 deprecated
defaultValueatuseFieldArrayas a required prop (#5636)
🍌 deprecated defaultValue at useFieldArray as a required prop (#5636)
function Test() {
const { control, register } = useForm();
const { fields, append, prepend, remove, swap, move, insert } = useFieldArray({
control,
name: "test",
});
return (
{fields.map((field, index) => (
<input
key={field.id} // important to include key with field's id
{...register(`test.${index}.value`)}
- defaultValue={field.value} // no longer required
/>
))}
);
}
👨🏻💻 fix #5787 controller type for defaultValue (#5792) 😿 fix #5777 regression on unmount defaultValue with shouldUnregister:true (#5778) 📅 close #5724 setValue skip parse date time as object (#5729) 🎮 #5712 enable controller with native validation () 🐛 fix spread non-primitive values in nested array fields () 🎪 batch single watch update () 🏟️ batch unregister inputs () 🐞 fix trigger not focusing first input with error ()