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.
@@ -86,17 +86,17 @@ var KeepTab = function KeepTab(props) {
86
86
  React.useEffect(function () {
87
87
  var _a, _b;
88
88
 
89
- if (tabActiveKey) {
89
+ if (!('activeKey' in props)) {
90
90
  var resultActiveTab = find(arrayChildren, {
91
- key: tabActiveKey
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
 
@@ -139,17 +139,17 @@ var KeepTab = function KeepTab(props) {
139
139
  React.useEffect(function () {
140
140
  var _a, _b;
141
141
 
142
- if (tabActiveKey) {
142
+ if (!('activeKey' in props)) {
143
143
  var resultActiveTab = lodash_1.find(arrayChildren, {
144
- key: tabActiveKey
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.76",
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": "6e4862aa641f382f96afc1d00af96c68d23f424d"
72
+ "gitHead": "9636a87471d75ecd5b903061c2ce5022d684833f"
73
73
  }