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
|
@@ -12267,6 +12267,7 @@ const Tabs$1 = (p) => {
|
|
|
12267
12267
|
(_a2 = props.onChange) === null || _a2 === void 0 ? void 0 : _a2.call(props, v);
|
|
12268
12268
|
}
|
|
12269
12269
|
});
|
|
12270
|
+
const manuallyActiveRef = useRef(null);
|
|
12270
12271
|
const [{
|
|
12271
12272
|
x,
|
|
12272
12273
|
width
|
|
@@ -12427,13 +12428,15 @@ const Tabs$1 = (p) => {
|
|
|
12427
12428
|
const currentKey = findNextEnabledTab(currentIndex, offsetDirection);
|
|
12428
12429
|
if (isNext || isPrev) {
|
|
12429
12430
|
e2.preventDefault();
|
|
12431
|
+
manuallyActiveRef.current = currentKey;
|
|
12430
12432
|
setActiveKey(currentKey);
|
|
12431
12433
|
}
|
|
12432
12434
|
};
|
|
12433
12435
|
useEffect(() => {
|
|
12434
12436
|
var _a2;
|
|
12435
|
-
if (activeKey && tabRefs.current[activeKey]) {
|
|
12437
|
+
if (activeKey && tabRefs.current[activeKey] && manuallyActiveRef.current === activeKey) {
|
|
12436
12438
|
(_a2 = tabRefs.current[activeKey]) === null || _a2 === void 0 ? void 0 : _a2.focus();
|
|
12439
|
+
manuallyActiveRef.current = null;
|
|
12437
12440
|
}
|
|
12438
12441
|
}, [activeKey]);
|
|
12439
12442
|
return withNativeProps(props, React__default.createElement("div", {
|