antd-mobile 5.41.0 → 5.41.1-alpha.1
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/2x/bundle/antd-mobile.cjs.development.js +4 -1
- package/2x/bundle/antd-mobile.cjs.js +4 -4
- package/2x/bundle/antd-mobile.es.development.js +4 -1
- package/2x/bundle/antd-mobile.es.js +655 -655
- package/2x/bundle/antd-mobile.umd.development.js +4 -1
- package/2x/bundle/antd-mobile.umd.js +4 -4
- package/2x/cjs/components/tabs/tabs.js +5 -1
- package/2x/es/components/tabs/tabs.js +5 -1
- package/2x/package.json +1 -1
- package/bundle/antd-mobile.cjs.development.js +4 -1
- package/bundle/antd-mobile.cjs.js +4 -4
- package/bundle/antd-mobile.compatible.umd.js +1 -1
- package/bundle/antd-mobile.es.development.js +4 -1
- package/bundle/antd-mobile.es.js +655 -655
- package/bundle/antd-mobile.umd.development.js +4 -1
- package/bundle/antd-mobile.umd.js +4 -4
- package/cjs/components/tabs/tabs.js +5 -1
- package/es/components/tabs/tabs.js +5 -1
- package/package.json +1 -1
- package/umd/antd-mobile.js +1 -1
|
@@ -12285,6 +12285,7 @@ const Tabs$1 = (p) => {
|
|
|
12285
12285
|
(_a2 = props.onChange) === null || _a2 === void 0 ? void 0 : _a2.call(props, v);
|
|
12286
12286
|
}
|
|
12287
12287
|
});
|
|
12288
|
+
const manuallyActiveRef = React$3.useRef(null);
|
|
12288
12289
|
const [{
|
|
12289
12290
|
x,
|
|
12290
12291
|
width
|
|
@@ -12445,13 +12446,15 @@ const Tabs$1 = (p) => {
|
|
|
12445
12446
|
const currentKey = findNextEnabledTab(currentIndex, offsetDirection);
|
|
12446
12447
|
if (isNext || isPrev) {
|
|
12447
12448
|
e2.preventDefault();
|
|
12449
|
+
manuallyActiveRef.current = currentKey;
|
|
12448
12450
|
setActiveKey(currentKey);
|
|
12449
12451
|
}
|
|
12450
12452
|
};
|
|
12451
12453
|
React$3.useEffect(() => {
|
|
12452
12454
|
var _a2;
|
|
12453
|
-
if (activeKey && tabRefs.current[activeKey]) {
|
|
12455
|
+
if (activeKey && tabRefs.current[activeKey] && manuallyActiveRef.current === activeKey) {
|
|
12454
12456
|
(_a2 = tabRefs.current[activeKey]) === null || _a2 === void 0 ? void 0 : _a2.focus();
|
|
12457
|
+
manuallyActiveRef.current = null;
|
|
12455
12458
|
}
|
|
12456
12459
|
}, [activeKey]);
|
|
12457
12460
|
return withNativeProps(props, React$3.createElement("div", {
|