linear-react-components-ui 1.0.10-rc.11 → 1.0.10-rc.12

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/lib/form/index.js CHANGED
@@ -217,12 +217,14 @@ var Form = function Form(_ref) {
217
217
  setSubmitFormOnEnter(submitOnPressEnterKey);
218
218
  }
219
219
  }, [submitOnPressEnterKey]);
220
- if (JSON.stringify(dataSource) !== JSON.stringify(data)) {
221
- setData(dataSource);
222
- setOriginalData(function (prevState) {
223
- return prevState || dataSource;
224
- });
225
- }
220
+ (0, _react.useEffect)(function () {
221
+ if (JSON.stringify(dataSource) !== JSON.stringify(data)) {
222
+ setData(dataSource);
223
+ }
224
+ if (_lodash.default.isEmpty(originalData)) {
225
+ setOriginalData(dataSource);
226
+ }
227
+ }, [JSON.stringify(dataSource)]);
226
228
  var contextValues = {
227
229
  skeletonize: skeletonize,
228
230
  handlerFieldChange: onFieldChange,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linear-react-components-ui",
3
- "version": "1.0.10-rc.11",
3
+ "version": "1.0.10-rc.12",
4
4
  "description": "Linear Sistemas ReactJs Components",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.cjs",