@zat-design/sisyphus-react 3.8.0-beta.18 → 3.8.0-beta.19

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.
@@ -87,7 +87,7 @@ var ListChangedWrapper = function ListChangedWrapper(props) {
87
87
  var namePath = toNamePath(namesStr || name);
88
88
  var originalNamePath = toNamePath(originalName);
89
89
  var originalNamePaths = originalNames && toNamePaths(originalNames);
90
- var isWatch = originalValues;
90
+ var isWatch = Boolean(originalValues);
91
91
  var originalValue = isWatch ? getOriginalValue({
92
92
  namePath: namePath,
93
93
  originalName: originalNamePath,
@@ -286,7 +286,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
286
286
  return item.rowKey;
287
287
  }) : true;
288
288
  // 初始化默认生成row-key
289
- if ((value === null || value === void 0 ? void 0 : value.length) && (!isAllHasKey || !isOriginalAllHasKey)) {
289
+ if ((value === null || value === void 0 ? void 0 : value.length) && !isAllHasKey || (originalArr === null || originalArr === void 0 ? void 0 : originalArr.length) && !isOriginalAllHasKey) {
290
290
  var _originalArr$forEach;
291
291
  var nextValues = value === null || value === void 0 ? void 0 : value.map(function (item) {
292
292
  return _objectSpread(_objectSpread({}, item), {}, {
@@ -301,7 +301,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
301
301
  form.setFieldValue(virtualRowName, nextValues);
302
302
  }
303
303
  }
304
- }, [value]);
304
+ }, [value, originalValues]);
305
305
  useImperativeHandle((resetProps === null || resetProps === void 0 ? void 0 : resetProps.ref) || ref, function () {
306
306
  return {
307
307
  getInternalState: function getInternalState() {
@@ -92,7 +92,7 @@ var ListChangedWrapper = function ListChangedWrapper(props) {
92
92
  var namePath = toNamePath(namesStr || name);
93
93
  var originalNamePath = toNamePath(originalName);
94
94
  var originalNamePaths = originalNames && toNamePaths(originalNames);
95
- var isWatch = originalValues;
95
+ var isWatch = Boolean(originalValues);
96
96
  var originalValue = isWatch ? getOriginalValue({
97
97
  namePath: namePath,
98
98
  originalName: originalNamePath,
@@ -289,7 +289,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
289
289
  return item.rowKey;
290
290
  }) : true;
291
291
  // 初始化默认生成row-key
292
- if ((value === null || value === void 0 ? void 0 : value.length) && (!isAllHasKey || !isOriginalAllHasKey)) {
292
+ if ((value === null || value === void 0 ? void 0 : value.length) && !isAllHasKey || (originalArr === null || originalArr === void 0 ? void 0 : originalArr.length) && !isOriginalAllHasKey) {
293
293
  var _originalArr$forEach;
294
294
  var nextValues = value === null || value === void 0 ? void 0 : value.map(function (item) {
295
295
  return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
@@ -304,7 +304,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
304
304
  form.setFieldValue(virtualRowName, nextValues);
305
305
  }
306
306
  }
307
- }, [value]);
307
+ }, [value, originalValues]);
308
308
  (0, _react.useImperativeHandle)((resetProps === null || resetProps === void 0 ? void 0 : resetProps.ref) || ref, function () {
309
309
  return {
310
310
  getInternalState: function getInternalState() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.8.0-beta.18",
3
+ "version": "3.8.0-beta.19",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",