assui 3.2.44 → 3.2.46
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;
|
|
@@ -10,7 +10,6 @@ export type ComponentConfig<C extends React.ComponentType<any> = React.Component
|
|
|
10
10
|
export type DynamicComponentType = {
|
|
11
11
|
label: string | React.ReactNode;
|
|
12
12
|
value: any;
|
|
13
|
-
name: string;
|
|
14
13
|
} & ComponentConfig;
|
|
15
14
|
export type ConditionSelectProps = {
|
|
16
15
|
value?: ValueType;
|
|
@@ -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;
|
|
@@ -10,7 +10,6 @@ export type ComponentConfig<C extends React.ComponentType<any> = React.Component
|
|
|
10
10
|
export type DynamicComponentType = {
|
|
11
11
|
label: string | React.ReactNode;
|
|
12
12
|
value: any;
|
|
13
|
-
name: string;
|
|
14
13
|
} & ComponentConfig;
|
|
15
14
|
export type ConditionSelectProps = {
|
|
16
15
|
value?: ValueType;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "assui",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.46",
|
|
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": "
|
|
85
|
+
"gitHead": "a552f77977efb7f0e2d2abb20a4854c8345be059"
|
|
86
86
|
}
|