assui 2.0.76 → 2.0.77
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/keep-tab/index.js +4 -4
- package/lib/keep-tab/index.js +4 -4
- package/package.json +2 -2
package/es/keep-tab/index.js
CHANGED
|
@@ -86,17 +86,17 @@ var KeepTab = function KeepTab(props) {
|
|
|
86
86
|
React.useEffect(function () {
|
|
87
87
|
var _a, _b;
|
|
88
88
|
|
|
89
|
-
if (
|
|
89
|
+
if (!('activeKey' in props)) {
|
|
90
90
|
var resultActiveTab = find(arrayChildren, {
|
|
91
|
-
key:
|
|
91
|
+
key: urlParams[saveActiveKeyName]
|
|
92
92
|
});
|
|
93
93
|
|
|
94
94
|
if (!resultActiveTab || resultActiveTab.props.disabled) {
|
|
95
95
|
setUrlParams((_a = {}, _a[saveActiveKeyName] = arrayChildren[0].key, _a));
|
|
96
96
|
onChange === null || onChange === void 0 ? void 0 : onChange(arrayChildren[0].key);
|
|
97
|
-
} else {
|
|
98
|
-
setUrlParams((_b = {}, _b[saveActiveKeyName] = tabActiveKey, _b));
|
|
99
97
|
}
|
|
98
|
+
} else {
|
|
99
|
+
setUrlParams((_b = {}, _b[saveActiveKeyName] = tabActiveKey, _b));
|
|
100
100
|
}
|
|
101
101
|
}, [tabActiveKey]);
|
|
102
102
|
|
package/lib/keep-tab/index.js
CHANGED
|
@@ -139,17 +139,17 @@ var KeepTab = function KeepTab(props) {
|
|
|
139
139
|
React.useEffect(function () {
|
|
140
140
|
var _a, _b;
|
|
141
141
|
|
|
142
|
-
if (
|
|
142
|
+
if (!('activeKey' in props)) {
|
|
143
143
|
var resultActiveTab = lodash_1.find(arrayChildren, {
|
|
144
|
-
key:
|
|
144
|
+
key: urlParams[saveActiveKeyName]
|
|
145
145
|
});
|
|
146
146
|
|
|
147
147
|
if (!resultActiveTab || resultActiveTab.props.disabled) {
|
|
148
148
|
setUrlParams((_a = {}, _a[saveActiveKeyName] = arrayChildren[0].key, _a));
|
|
149
149
|
onChange === null || onChange === void 0 ? void 0 : onChange(arrayChildren[0].key);
|
|
150
|
-
} else {
|
|
151
|
-
setUrlParams((_b = {}, _b[saveActiveKeyName] = tabActiveKey, _b));
|
|
152
150
|
}
|
|
151
|
+
} else {
|
|
152
|
+
setUrlParams((_b = {}, _b[saveActiveKeyName] = tabActiveKey, _b));
|
|
153
153
|
}
|
|
154
154
|
}, [tabActiveKey]);
|
|
155
155
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "assui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.77",
|
|
4
4
|
"description": "react ui library",
|
|
5
5
|
"author": "jason <usochen@gmail.com>",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"node": ">=10.0.0"
|
|
70
70
|
},
|
|
71
71
|
"license": "MIT",
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "9636a87471d75ecd5b903061c2ce5022d684833f"
|
|
73
73
|
}
|