@zat-design/sisyphus-react 3.13.20-beta.6 → 3.13.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.
- package/es/ProTabs/index.js +8 -0
- package/lib/ProTabs/index.js +8 -0
- package/package.json +1 -1
package/es/ProTabs/index.js
CHANGED
@@ -95,6 +95,14 @@ var ProTabs = (props, ref) => {
|
|
95
95
|
}
|
96
96
|
fetchFunction.run(params);
|
97
97
|
}, [useRequest === null || useRequest === void 0 ? void 0 : useRequest.options]);
|
98
|
+
|
99
|
+
// dataSource变化时,更新selectList
|
100
|
+
useDeepCompareEffect(() => {
|
101
|
+
if (!(dataSource !== null && dataSource !== void 0 && dataSource.length)) {
|
102
|
+
return;
|
103
|
+
}
|
104
|
+
setSelectList(dataSource);
|
105
|
+
}, [dataSource]);
|
98
106
|
useImperativeHandle(ref, () => ({
|
99
107
|
useRequestRef: fetchFunction
|
100
108
|
}));
|
package/lib/ProTabs/index.js
CHANGED
@@ -103,6 +103,14 @@ var ProTabs = (props, ref) => {
|
|
103
103
|
}
|
104
104
|
fetchFunction.run(params);
|
105
105
|
}, [useRequest === null || useRequest === void 0 ? void 0 : useRequest.options]);
|
106
|
+
|
107
|
+
// dataSource变化时,更新selectList
|
108
|
+
(0, _ahooks.useDeepCompareEffect)(() => {
|
109
|
+
if (!(dataSource !== null && dataSource !== void 0 && dataSource.length)) {
|
110
|
+
return;
|
111
|
+
}
|
112
|
+
setSelectList(dataSource);
|
113
|
+
}, [dataSource]);
|
106
114
|
(0, _react.useImperativeHandle)(ref, () => ({
|
107
115
|
useRequestRef: fetchFunction
|
108
116
|
}));
|