TabLayout 마우스일때만 포커스가 아닌 클릭으로 탭 열리게 수정

This commit is contained in:
고동영
2024-02-21 10:34:55 +09:00
parent 6d192d0edf
commit 9e562c9938

View File

@@ -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 */}