[251024] fix: SearchPanel.new.v2 Optimization-2

🕐 커밋 시간: 2025. 10. 24. 10:15:20

📊 변경 통계:
  • 총 파일: 2개
  • 추가: +4줄
  • 삭제: -15줄

📝 수정된 파일:
  ~ com.twin.app.shoptime/src/views/SearchPanel/SearchInpuOverlay.jsx
  ~ com.twin.app.shoptime/src/views/SearchPanel/SearchPanel.new.v2.jsx

🔧 주요 변경 내용:
  • 코드 정리 및 최적화

Performance: 코드 최적화로 성능 개선 기대
This commit is contained in:
2025-10-24 10:15:21 +09:00
parent 1f2f8ed8a4
commit ec6c3aa4cd
2 changed files with 4 additions and 15 deletions

View File

@@ -43,7 +43,7 @@ const SearchInputOverlay = ({
],
[]
);
// Input 창에서 API 호출 핸들러 (돋보기 아이콘 클릭 시에만)
const handleSearchSubmit = useCallback(
(query) => {
if (searchQuery && searchQuery.trim()) {
@@ -64,9 +64,7 @@ const SearchInputOverlay = ({
[dispatch, searchQuery, onClose]
);
// ✨ [Phase 9] handleInputKeyDown 제거 - TInput은 항상 Input 모드만 지원
// Enter 키는 부모(SearchPanel.new.v2.jsx)에서 처리
const handleDimClick = useCallback(
(e) => {
onClose();
@@ -74,7 +72,6 @@ const SearchInputOverlay = ({
[onClose]
);
// ✨ [Phase 9] Overlay 표시 시 TInput에 포커스
useEffect(() => {
if (isVisible) {
const input = document.querySelector(`[data-spotlight-id="input-field-box"] > input`);

View File

@@ -600,15 +600,7 @@ export default function SearchPanel({ panelInfo, isOnTop, spotlightId }) {
}, 150); // Overlay 닫히는 시간을 고려한 지연
}, []);
/**
* 0hun: searchOvelay의 최근 검색어 keyword 클릭 시 호출되는 함수.
*/
const handleSearchOverlayKeyword = (keyword) => {
setSearchQuery(keyword);
setIsSearchOverlayVisible(false);
setInputFocus(false);
};
// ✨ [Phase 3] handleInputIconClick 제거 (돋보기 아이콘 기능 비활성화)
// /**
// * ✨ [Phase 3] TInput icon click handler (showVirtualKeyboard 제거)
@@ -1291,7 +1283,7 @@ export default function SearchPanel({ panelInfo, isOnTop, spotlightId }) {
searchQuery={searchQuery}
onSearchChange={handleSearchChange}
onSearchSubmit={handleSearchSubmit}
handleClick={handleSearchOverlayKeyword}
handleClick={handleKeywordClick}
/>
</TPanel>
);