assui 3.2.44 → 3.2.45

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.
@@ -53,7 +53,7 @@ var ConditionSelect = function ConditionSelect(_a) {
53
53
  componentValue = _b[0],
54
54
  setComponentValue = _b[1];
55
55
  var current = React.useMemo(function () {
56
- if (!componentValue || !componentValue[selectName]) {
56
+ if (!componentValue || !componentValue[selectName] || !option || option.length === 0) {
57
57
  return null;
58
58
  }
59
59
  var result = option.find(function (item) {
@@ -63,7 +63,7 @@ var ConditionSelect = function ConditionSelect(_a) {
63
63
  return result;
64
64
  }
65
65
  throw new Error('can not find this option');
66
- }, [componentValue]);
66
+ }, [componentValue, option]);
67
67
  var DynamicComponent = current === null || current === void 0 ? void 0 : current.component;
68
68
  var componentProps = omit(current === null || current === void 0 ? void 0 : current.componentProps, 'parseValue');
69
69
  var fieldProps = current === null || current === void 0 ? void 0 : current.componentProps;
@@ -63,7 +63,7 @@ var ConditionSelect = function ConditionSelect(_a) {
63
63
  componentValue = _b[0],
64
64
  setComponentValue = _b[1];
65
65
  var current = react_1["default"].useMemo(function () {
66
- if (!componentValue || !componentValue[selectName]) {
66
+ if (!componentValue || !componentValue[selectName] || !option || option.length === 0) {
67
67
  return null;
68
68
  }
69
69
  var result = option.find(function (item) {
@@ -73,7 +73,7 @@ var ConditionSelect = function ConditionSelect(_a) {
73
73
  return result;
74
74
  }
75
75
  throw new Error('can not find this option');
76
- }, [componentValue]);
76
+ }, [componentValue, option]);
77
77
  var DynamicComponent = current === null || current === void 0 ? void 0 : current.component;
78
78
  var componentProps = (0, omit_1["default"])(current === null || current === void 0 ? void 0 : current.componentProps, 'parseValue');
79
79
  var fieldProps = current === null || current === void 0 ? void 0 : current.componentProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assui",
3
- "version": "3.2.44",
3
+ "version": "3.2.45",
4
4
  "description": "react ui library",
5
5
  "author": "jason <usochen@gmail.com>",
6
6
  "main": "./lib/index.js",
@@ -82,5 +82,5 @@
82
82
  "node": ">=10.0.0"
83
83
  },
84
84
  "license": "MIT",
85
- "gitHead": "925034dc24044b4067c088125c6be51511a3f33f"
85
+ "gitHead": "8d7a5ac80317bfd7a2778be816d6afe2dc13091f"
86
86
  }