@yeeyoon/library 3.7.4 → 3.7.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -10,6 +10,8 @@ const TenantSelector = (props) => {
|
|
10
10
|
tenantId,
|
11
11
|
tenantIdChangeCb,
|
12
12
|
appId,
|
13
|
+
isSharePlatform,
|
14
|
+
shareTenantIdList,
|
13
15
|
// handleException,
|
14
16
|
} = props;
|
15
17
|
const [options, setOptions] = useState([]);
|
@@ -35,6 +37,11 @@ const TenantSelector = (props) => {
|
|
35
37
|
value: item.id,
|
36
38
|
});
|
37
39
|
});
|
40
|
+
if (isSharePlatform) {
|
41
|
+
tenantList = tenantList.filter((item) =>
|
42
|
+
shareTenantIdList.includes(item.value)
|
43
|
+
);
|
44
|
+
}
|
38
45
|
setOptions(tenantList);
|
39
46
|
}
|
40
47
|
};
|
@@ -64,8 +71,9 @@ const TenantSelector = (props) => {
|
|
64
71
|
// }
|
65
72
|
}}
|
66
73
|
onSelect={(value, option) => {
|
67
|
-
|
68
|
-
|
74
|
+
const { label } = option;
|
75
|
+
setValue(label);
|
76
|
+
tenantIdChangeCb && tenantIdChangeCb(value, label, option);
|
69
77
|
}}
|
70
78
|
/>
|
71
79
|
);
|
@@ -76,6 +84,8 @@ TenantSelector.propTypes = {
|
|
76
84
|
appId: PropTypes.string,
|
77
85
|
tenantIdChangeCb: PropTypes.func,
|
78
86
|
handleException: PropTypes.func,
|
87
|
+
shareTenantIdList: PropTypes.array,
|
88
|
+
isSharePlatform: PropTypes.bool,
|
79
89
|
};
|
80
90
|
|
81
91
|
export default TenantSelector;
|