@zat-design/sisyphus-react 3.4.2-beta.26 → 3.4.2-beta.27

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.
@@ -300,7 +300,7 @@ var RenderField = function RenderField(_ref) {
300
300
  }
301
301
  _args = [].concat(args);
302
302
  rowPath = [].concat(_toConsumableArray(namePath), [index]);
303
- row = form.getFieldValue(rowPath, true);
303
+ row = type === 'Group' ? _args[1] : form.getFieldValue(rowPath, true);
304
304
  orgRow = cloneDeep(row);
305
305
  if (!onFieldChange) {
306
306
  _context.next = 18;
@@ -483,8 +483,10 @@ var RenderField = function RenderField(_ref) {
483
483
  isView: isView
484
484
  }
485
485
  });
486
- if (type !== 'Group') {
487
- componentProps = omit(componentProps, ['onFieldChange', 'index']);
486
+ if (type === 'Group') {
487
+ componentProps.onFieldChange = _onchange;
488
+ } else {
489
+ componentProps = omit(componentProps, ['onFieldChange', 'namePath', 'index']);
488
490
  }
489
491
  // 单元格编辑时,设置各个单元格disabled属性
490
492
  if (isCell) {
@@ -70,8 +70,7 @@ var Group = function Group(props) {
70
70
  var touchName = ((_document = document) === null || _document === void 0 ? void 0 : (_document$activeEleme = _document.activeElement) === null || _document$activeEleme === void 0 ? void 0 : _document$activeEleme.id) || '';
71
71
  // 模拟change,初始化不执行onFieldChange
72
72
  if (isFunction(onFieldChange) && form.isFieldsTouched(names) && transformNamesString(names).includes(touchName)) {
73
- var record = namePath ? form.getFieldValue(namePath) : form.getFieldsValue();
74
- onFieldChange(value, record, {
73
+ onFieldChange(value, namePath ? form.getFieldValue(namePath, true) : form.getFieldsValue(), {
75
74
  form: form,
76
75
  namePath: namePath,
77
76
  index: index
@@ -303,7 +303,7 @@ var RenderField = function RenderField(_ref) {
303
303
  }
304
304
  _args = [].concat(args);
305
305
  rowPath = [].concat((0, _toConsumableArray2.default)(namePath), [index]);
306
- row = form.getFieldValue(rowPath, true);
306
+ row = type === 'Group' ? _args[1] : form.getFieldValue(rowPath, true);
307
307
  orgRow = (0, _lodash.cloneDeep)(row);
308
308
  if (!onFieldChange) {
309
309
  _context.next = 18;
@@ -486,8 +486,10 @@ var RenderField = function RenderField(_ref) {
486
486
  isView: isView
487
487
  }
488
488
  });
489
- if (type !== 'Group') {
490
- componentProps = (0, _lodash.omit)(componentProps, ['onFieldChange', 'index']);
489
+ if (type === 'Group') {
490
+ componentProps.onFieldChange = _onchange;
491
+ } else {
492
+ componentProps = (0, _lodash.omit)(componentProps, ['onFieldChange', 'namePath', 'index']);
491
493
  }
492
494
  // 单元格编辑时,设置各个单元格disabled属性
493
495
  if (isCell) {
@@ -74,8 +74,7 @@ var Group = function Group(props) {
74
74
  var touchName = ((_document = document) === null || _document === void 0 ? void 0 : (_document$activeEleme = _document.activeElement) === null || _document$activeEleme === void 0 ? void 0 : _document$activeEleme.id) || '';
75
75
  // 模拟change,初始化不执行onFieldChange
76
76
  if ((0, _lodash.isFunction)(onFieldChange) && form.isFieldsTouched(names) && (0, _utils.transformNamesString)(names).includes(touchName)) {
77
- var record = namePath ? form.getFieldValue(namePath) : form.getFieldsValue();
78
- onFieldChange(value, record, {
77
+ onFieldChange(value, namePath ? form.getFieldValue(namePath, true) : form.getFieldsValue(), {
79
78
  form: form,
80
79
  namePath: namePath,
81
80
  index: index
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.4.2-beta.26",
3
+ "version": "3.4.2-beta.27",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",