[지라이슈없음] Search Results -> Show 진입 후 복귀 시 포커스 초기화되는 현상

수정 사항: gridListId에 searchTimestamp 추가 후 spotlightId 지정, 기존 (3939) 이슈 수정하면서 사이드 발생
This commit is contained in:
hyunwoo93.cha
2025-01-22 11:23:50 +09:00
parent e93879c6b7
commit d876f29c8e

View File

@@ -182,6 +182,17 @@ export default function SearchResultsType({
[category, data, idx, searchQueryRef]
);
const gridListId = useMemo(() => {
switch (category) {
case "theme":
return `${SpotlightIds.SEARCH_THEME}-${searchTimestamp}`;
case "show":
return `${SpotlightIds.SEARCH_SHOW}-${searchTimestamp}`;
case "item":
return `${SpotlightIds.SEARCH_ITEM}-${searchTimestamp}`;
}
}, [category, searchTimestamp]);
const { itemWidth, itemHeight, spacing } = ITEM_SIZE[category] || {};
return (
@@ -198,6 +209,7 @@ export default function SearchResultsType({
<TVirtualGridList
defaultSpotlightId={panelInfo.currentSpot}
restorePositionX={panelInfo.x}
spotlightId={gridListId}
key={`${category}-${searchTimestamp}`}
cbScrollTo={getScrollTo}
className={classNames(