@data-driven-forms/react-form-renderer
Advanced tools
Comparing version 3.16.10 to 3.16.11
@@ -89,11 +89,21 @@ "use strict"; | ||
setTimeout(function () { | ||
formOptions.batch(function () { | ||
Object.entries(setter).forEach(function (_ref3) { | ||
var _ref4 = (0, _slicedToArray2["default"])(_ref3, 2), | ||
name = _ref4[0], | ||
value = _ref4[1]; | ||
/** | ||
* We have to get the meta in the timetout to wait for state initialization | ||
*/ | ||
var meta = formOptions.getFieldState(field.name); | ||
/** | ||
* Apply setter only on modfied fields or on fields with no initial value. | ||
*/ | ||
formOptions.change(name, value); | ||
if (typeof meta.initial === 'undefined' || meta.modified) { | ||
formOptions.batch(function () { | ||
Object.entries(setter).forEach(function (_ref3) { | ||
var _ref4 = (0, _slicedToArray2["default"])(_ref3, 2), | ||
name = _ref4[0], | ||
value = _ref4[1]; | ||
formOptions.change(name, value); | ||
}); | ||
}); | ||
}); | ||
} | ||
}); | ||
@@ -100,0 +110,0 @@ } |
@@ -64,11 +64,21 @@ import _typeof from "@babel/runtime/helpers/typeof"; | ||
setTimeout(function () { | ||
formOptions.batch(function () { | ||
Object.entries(setter).forEach(function (_ref3) { | ||
var _ref4 = _slicedToArray(_ref3, 2), | ||
name = _ref4[0], | ||
value = _ref4[1]; | ||
/** | ||
* We have to get the meta in the timetout to wait for state initialization | ||
*/ | ||
var meta = formOptions.getFieldState(field.name); | ||
/** | ||
* Apply setter only on modfied fields or on fields with no initial value. | ||
*/ | ||
formOptions.change(name, value); | ||
if (typeof meta.initial === 'undefined' || meta.modified) { | ||
formOptions.batch(function () { | ||
Object.entries(setter).forEach(function (_ref3) { | ||
var _ref4 = _slicedToArray(_ref3, 2), | ||
name = _ref4[0], | ||
value = _ref4[1]; | ||
formOptions.change(name, value); | ||
}); | ||
}); | ||
}); | ||
} | ||
}); | ||
@@ -75,0 +85,0 @@ } |
{ | ||
"name": "@data-driven-forms/react-form-renderer", | ||
"version": "3.16.10", | ||
"version": "3.16.11", | ||
"description": "React Form Renderer. Data Driven Forms converts JSON form definitions into fully functional React forms.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
288921
5830