react-hook-form 7.25.2 → 7.25.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.mjs +2 -2
- package/dist/index.esm.mjs.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.mjs
CHANGED
@@ -534,11 +534,11 @@ const useFieldArray = (props) => {
|
|
534
534
|
}, true, false);
|
535
535
|
};
|
536
536
|
const replace = (value) => {
|
537
|
-
const updatedFieldArrayValues = convertToArrayPayload(value);
|
537
|
+
const updatedFieldArrayValues = convertToArrayPayload(cloneObject(value));
|
538
538
|
ids.current = updatedFieldArrayValues.map(generateId);
|
539
539
|
updateValues([...updatedFieldArrayValues]);
|
540
540
|
setFields([...updatedFieldArrayValues]);
|
541
|
-
control._updateFieldArray(name, [...updatedFieldArrayValues], () =>
|
541
|
+
control._updateFieldArray(name, [...updatedFieldArrayValues], (data) => data, {}, true, false);
|
542
542
|
};
|
543
543
|
React.useEffect(() => {
|
544
544
|
control._stateFlags.action = false;
|