[251026] fix: SearchPanel.new.v2 Focus -1
🕐 커밋 시간: 2025. 10. 26. 13:48:01 📊 변경 통계: • 총 파일: 3개 • 추가: +34줄 • 삭제: -1줄 📝 수정된 파일: ~ com.twin.app.shoptime/src/views/SearchPanel/HowAboutThese/HowAboutThese.small.jsx ~ com.twin.app.shoptime/src/views/SearchPanel/SearchPanel.new.v2.jsx ~ com.twin.app.shoptime/src/views/SearchPanel/SearchResults.new.v2.jsx 🔧 주요 변경 내용: • 소규모 기능 개선
This commit is contained in:
@@ -108,7 +108,7 @@ const HowAboutTheseSmall = ({
|
||||
</div>
|
||||
|
||||
{/* See More Button */}
|
||||
<TButton className={css.seeMoreButton} size="small" onClick={handleSeeMoreClick}>
|
||||
<TButton className={css.seeMoreButton} size="small" onClick={handleSeeMoreClick} spotlightId="howAboutThese-seeMore">
|
||||
<div className={css.seeMoreText}>SEE MORE</div>
|
||||
</TButton>
|
||||
</div>
|
||||
|
||||
@@ -394,6 +394,15 @@ export default function SearchPanel({ panelInfo, isOnTop, spotlightId }) {
|
||||
}
|
||||
}
|
||||
|
||||
// 아래쪽 화살표 키 처리 - SEE MORE 버튼으로 포커스 이동
|
||||
if (e.key === 'ArrowDown' || e.key === 'Down') {
|
||||
e.preventDefault();
|
||||
setTimeout(() => {
|
||||
Spotlight.focus('howAboutThese-seeMore');
|
||||
}, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
// 나머지 방향키는 Spotlight가 처리하도록 허용
|
||||
return;
|
||||
}
|
||||
@@ -1029,6 +1038,15 @@ export default function SearchPanel({ panelInfo, isOnTop, spotlightId }) {
|
||||
if (e.key === 'Enter') {
|
||||
onClickMic();
|
||||
}
|
||||
|
||||
// 아래쪽 화살표 키 처리 - SEE MORE 버튼으로 포커스 이동
|
||||
if (e.key === 'ArrowDown' || e.key === 'Down') {
|
||||
e.preventDefault();
|
||||
setTimeout(() => {
|
||||
Spotlight.focus('howAboutThese-seeMore');
|
||||
}, 0);
|
||||
return;
|
||||
}
|
||||
},
|
||||
[onClickMic]
|
||||
);
|
||||
|
||||
@@ -206,6 +206,20 @@ const SearchResultsNew = ({
|
||||
// Spottable 컴포넌트 캐싱하여 메모리 누수 방지
|
||||
const SpottableDiv = useMemo(() => Spottable('div'), []);
|
||||
|
||||
// 탭 키다운 핸들러 - Arrow Up으로 SEE MORE 버튼으로 이동
|
||||
const handleTabKeyDown = useCallback(
|
||||
(e) => {
|
||||
if (e.key === 'ArrowUp' || e.key === 'Up') {
|
||||
e.preventDefault();
|
||||
setTimeout(() => {
|
||||
Spotlight.focus('howAboutThese-seeMore');
|
||||
}, 0);
|
||||
return;
|
||||
}
|
||||
},
|
||||
[]
|
||||
);
|
||||
|
||||
// 맨 처음으로 이동 (위 버튼)
|
||||
const upBtnClick = useCallback(() => {
|
||||
if (effectiveChangePageRef.current) {
|
||||
@@ -381,6 +395,7 @@ const SearchResultsNew = ({
|
||||
selectedIndex={tab}
|
||||
listType={LIST_TYPE.medium}
|
||||
spotlightId={SpotlightIds.SEARCH_TAB_CONTAINER}
|
||||
onKeyDown={handleTabKeyDown}
|
||||
/>
|
||||
{/* 2025/10/17 김영진 부장과 이야기 하여 일반에서는 아직 필터 검토하지않아 빼달라고 하여 우선 일반검색에서는 미노출 처리 추후 처리 필요함 */}
|
||||
{tab === 0 && !itemInfo?.length && (
|
||||
|
||||
Reference in New Issue
Block a user