tablayout subtitle title 값이 동일하여 생기는 오류 수정
This commit is contained in:
@@ -1,21 +1,13 @@
|
||||
import React, {
|
||||
useCallback,
|
||||
useEffect,
|
||||
useRef,
|
||||
useState,
|
||||
} from 'react';
|
||||
import React, { useCallback, useEffect, useRef, useState } from "react";
|
||||
|
||||
import classNames from 'classnames';
|
||||
import compose from 'ramda/src/compose';
|
||||
import classNames from "classnames";
|
||||
import compose from "ramda/src/compose";
|
||||
|
||||
import { Job } from '@enact/core/util';
|
||||
import {
|
||||
Marquee,
|
||||
MarqueeController,
|
||||
} from '@enact/sandstone/Marquee';
|
||||
import Spottable from '@enact/spotlight/Spottable';
|
||||
import { Job } from "@enact/core/util";
|
||||
import { Marquee, MarqueeController } from "@enact/sandstone/Marquee";
|
||||
import Spottable from "@enact/spotlight/Spottable";
|
||||
|
||||
import css from './TabItemSub.module.less';
|
||||
import css from "./TabItemSub.module.less";
|
||||
|
||||
const SpottableComponent = Spottable("div");
|
||||
const TabItemBase = ({
|
||||
@@ -98,6 +90,7 @@ const TabItemBase = ({
|
||||
}, [path, focused]);
|
||||
|
||||
const TextComponent = useCallback(() => {
|
||||
const subtitle = title.split("-")[0];
|
||||
return (
|
||||
<>
|
||||
{expanded && (
|
||||
@@ -106,7 +99,7 @@ const TabItemBase = ({
|
||||
marqueeOn={"focus"}
|
||||
className={classNames(css.text, isSubItem && css.subItem)}
|
||||
>
|
||||
{title}
|
||||
{subtitle}
|
||||
</Marquee>
|
||||
)}
|
||||
</>
|
||||
|
||||
@@ -439,13 +439,6 @@ export default function TabLayout({ topPanelName, onTabActivated }) {
|
||||
({ index, target, title, path }) => {
|
||||
console.log("#selectedtitle", selectedTitle, title);
|
||||
|
||||
if (selectedTitle === "Home" && title === "Home" && target) {
|
||||
dispatch(resetPanels(target));
|
||||
deActivateTab();
|
||||
panelSwitching.current = true;
|
||||
panelSwitchingJob.start(panelSwitching);
|
||||
return;
|
||||
}
|
||||
if (selectedTitle === (title || path)) {
|
||||
Spotlight.focus(SpotlightIds.TPANEL);
|
||||
deActivateTab();
|
||||
@@ -687,7 +680,7 @@ export default function TabLayout({ topPanelName, onTabActivated }) {
|
||||
index={index}
|
||||
isSubItem={true}
|
||||
deActivateTab={deActivateTab}
|
||||
title={item.title}
|
||||
title={item.title + "-sub"}
|
||||
lgCatCd={item.id}
|
||||
path={item.path}
|
||||
showSubTab={showSubTab}
|
||||
|
||||
Reference in New Issue
Block a user