TabLayout 마우스일때만 포커스가 아닌 클릭으로 탭 열리게 수정
This commit is contained in:
@@ -366,8 +366,9 @@ export default function TabLayout({ topPanelName, onTabActivated }) {
|
||||
);
|
||||
|
||||
const onFocus = (index) => {
|
||||
setMainSelectedIndex(index);
|
||||
|
||||
// if (!cursorVisible) {
|
||||
// mainSelectedIndex(index);
|
||||
// }
|
||||
if (showSubTab) {
|
||||
setSecondDepthReduce((prev) => !prev);
|
||||
}
|
||||
@@ -375,8 +376,9 @@ export default function TabLayout({ topPanelName, onTabActivated }) {
|
||||
|
||||
const handleNavigation = useCallback(
|
||||
({ index, target }) => {
|
||||
setMainSelectedIndex(index);
|
||||
|
||||
if (target) {
|
||||
setMainSelectedIndex(index);
|
||||
dispatch(resetPanels(target));
|
||||
deActivateTab();
|
||||
panelSwitching.current = true;
|
||||
@@ -461,11 +463,12 @@ export default function TabLayout({ topPanelName, onTabActivated }) {
|
||||
}
|
||||
});
|
||||
}
|
||||
}, [secondDepthReduce, showSubTab]);
|
||||
}, [secondDepthReduce, showSubTab, mainSelectedIndex]);
|
||||
|
||||
if (!showTab) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={classNames(css.tabLayoutWrap, !tabActivated && css.hide)}>
|
||||
{/* collabsed Main */}
|
||||
|
||||
Reference in New Issue
Block a user