[SHOPTIME-3963] Search / Keyword 내 Show 컨텐츠 확인 후 포커싱 상이

수정 내용: SearchResults Container => preserveId 추가 / SearchResultsType의 spotlightId도 searchTimestamp에 맞게 초기화
This commit is contained in:
hyunwoo93.cha
2025-03-07 17:02:02 +09:00
parent 121206e3f9
commit 764e67ce9a
2 changed files with 14 additions and 21 deletions

View File

@@ -1,28 +1,19 @@
import React, {
memo,
useEffect,
useMemo,
useRef,
} from 'react';
import React, { memo, useEffect, useMemo, useRef } from "react";
import {
useDispatch,
useSelector,
} from 'react-redux';
import { useDispatch, useSelector } from "react-redux";
import { Job } from '@enact/core/util';
import Spotlight from '@enact/spotlight';
import SpotlightContainerDecorator
from '@enact/spotlight/SpotlightContainerDecorator';
import { Job } from "@enact/core/util";
import Spotlight from "@enact/spotlight";
import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator";
import { sendLogSearch } from '../../../actions/logActions';
import { $L } from '../../../utils/helperMethods';
import { SpotlightIds } from '../../../utils/SpotlightIds';
import css from './SearchResults.module.less';
import SearchResultsType from './SearchResultsType';
import { sendLogSearch } from "../../../actions/logActions";
import { $L } from "../../../utils/helperMethods";
import { SpotlightIds } from "../../../utils/SpotlightIds";
import css from "./SearchResults.module.less";
import SearchResultsType from "./SearchResultsType";
const Container = SpotlightContainerDecorator(
{ enterTo: "last-focused" },
{ enterTo: "last-focused", preserveId: true },
"div"
);

View File

@@ -195,10 +195,12 @@ export default function SearchResultsType({
const { itemWidth, itemHeight, spacing } = ITEM_SIZE[category] || {};
console.log("chw", gridListId);
return (
<Container
data-wheel-point={true}
spotlightId={"searchresult_section_" + category}
spotlightId={"searchresult_section_" + category + searchTimestamp}
>
<SectionTitle
className={css.sectionTitle}