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

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.
Files changed (2) hide show
  1. package/lib/form/index.js +9 -11
  2. package/package.json +1 -1
package/lib/form/index.js CHANGED
@@ -213,18 +213,16 @@ var Form = function Form(_ref) {
213
213
  };
214
214
  }, [securityBeforeUnload, onBeforeUnload]);
215
215
  (0, _react.useEffect)(function () {
216
- if (!disabled) {
217
- if (submitOnPressEnterKey !== submitFormOnEnter || dataSource !== originalData) {
218
- setData(function (prevState) {
219
- return !_lodash.default.isEqual(data, dataSource) ? dataSource : prevState;
220
- });
221
- setOriginalData(function (prevState) {
222
- return prevState || dataSource;
223
- });
224
- setSubmitFormOnEnter(submitOnPressEnterKey);
225
- }
216
+ if (!disabled && submitOnPressEnterKey !== submitFormOnEnter) {
217
+ setSubmitFormOnEnter(submitOnPressEnterKey);
226
218
  }
227
- }, [submitOnPressEnterKey, dataSource]);
219
+ }, [submitOnPressEnterKey]);
220
+ if (JSON.stringify(dataSource) !== JSON.stringify(data)) {
221
+ setData(dataSource);
222
+ setOriginalData(function (prevState) {
223
+ return prevState || dataSource;
224
+ });
225
+ }
228
226
  var contextValues = {
229
227
  skeletonize: skeletonize,
230
228
  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.10",
3
+ "version": "1.0.10-rc.11",
4
4
  "description": "Linear Sistemas ReactJs Components",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.cjs",