@zat-design/sisyphus-react 3.7.3-beta.19 → 3.7.3-beta.20

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.
@@ -30,7 +30,7 @@ var findSelectNameValues = function findSelectNameValues(_ref) {
30
30
  _iterator.f();
31
31
  }
32
32
  if (mode === 'multiple') {
33
- selectValues = [].concat(_toConsumableArray(selectValues), _toConsumableArray(result));
33
+ selectValues = [].concat(_toConsumableArray(selectValues), _toConsumableArray(result || []));
34
34
  } else {
35
35
  selectValues.push(result);
36
36
  }
@@ -53,13 +53,14 @@ export var getSelectList = function getSelectList(_ref2) {
53
53
  if (!otherProps) {
54
54
  return null;
55
55
  }
56
- var listName = otherProps.listName,
56
+ var name = otherProps.name,
57
+ listName = otherProps.listName,
57
58
  form = otherProps.form;
58
59
  var firstNumberIndex = listName.lastIndexOf(listName.findLast(function (item) {
59
60
  return typeof item === 'number';
60
61
  }));
61
- var fatherName = listName.slice(0, firstNumberIndex);
62
- var selectName = listName.slice(firstNumberIndex + 1);
62
+ var fatherName = (name || listName).slice(0, firstNumberIndex);
63
+ var selectName = (name || listName).slice(firstNumberIndex + 1);
63
64
  return findSelectNameValues({
64
65
  list: form.getFieldValue(fatherName) || [],
65
66
  selectName: selectName,
@@ -38,7 +38,7 @@ var findSelectNameValues = function findSelectNameValues(_ref) {
38
38
  _iterator.f();
39
39
  }
40
40
  if (mode === 'multiple') {
41
- selectValues = [].concat((0, _toConsumableArray2.default)(selectValues), (0, _toConsumableArray2.default)(result));
41
+ selectValues = [].concat((0, _toConsumableArray2.default)(selectValues), (0, _toConsumableArray2.default)(result || []));
42
42
  } else {
43
43
  selectValues.push(result);
44
44
  }
@@ -61,13 +61,14 @@ var getSelectList = exports.getSelectList = function getSelectList(_ref2) {
61
61
  if (!otherProps) {
62
62
  return null;
63
63
  }
64
- var listName = otherProps.listName,
64
+ var name = otherProps.name,
65
+ listName = otherProps.listName,
65
66
  form = otherProps.form;
66
67
  var firstNumberIndex = listName.lastIndexOf(listName.findLast(function (item) {
67
68
  return typeof item === 'number';
68
69
  }));
69
- var fatherName = listName.slice(0, firstNumberIndex);
70
- var selectName = listName.slice(firstNumberIndex + 1);
70
+ var fatherName = (name || listName).slice(0, firstNumberIndex);
71
+ var selectName = (name || listName).slice(firstNumberIndex + 1);
71
72
  return findSelectNameValues({
72
73
  list: form.getFieldValue(fatherName) || [],
73
74
  selectName: selectName,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.7.3-beta.19",
3
+ "version": "3.7.3-beta.20",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",