SHOPTIME-3346 searchpanel
- Search / Show Full 화면 진입 후 Item Detail 진입 > Back button 클릭시 포커싱 사라짐 - panels정보로 searchpanel일때에만 spotlight.focus주는 방식으로 처리.
This commit is contained in:
@@ -59,6 +59,7 @@ export default function SearchPanel({ panelInfo, isOnTop, spotlightId }) {
|
|||||||
);
|
);
|
||||||
const { searchDatas: searchDatas } = useSelector((state) => state.search);
|
const { searchDatas: searchDatas } = useSelector((state) => state.search);
|
||||||
const searchPerformed = useSelector((state) => state.search.searchPerformed);
|
const searchPerformed = useSelector((state) => state.search.searchPerformed);
|
||||||
|
const panels = useSelector((state) => state.panels.panels);
|
||||||
|
|
||||||
const [currentPage, setCurrentPage] = useState(1);
|
const [currentPage, setCurrentPage] = useState(1);
|
||||||
const [paginatedKeywords, setPaginatedKeywords] = useState([]);
|
const [paginatedKeywords, setPaginatedKeywords] = useState([]);
|
||||||
@@ -67,7 +68,7 @@ export default function SearchPanel({ panelInfo, isOnTop, spotlightId }) {
|
|||||||
panelInfo.searchVal ? panelInfo.searchVal : null
|
panelInfo.searchVal ? panelInfo.searchVal : null
|
||||||
);
|
);
|
||||||
const [position, setPosition] = useState(null);
|
const [position, setPosition] = useState(null);
|
||||||
|
|
||||||
let searchQueryRef = usePrevious(searchQuery);
|
let searchQueryRef = usePrevious(searchQuery);
|
||||||
let isOnTopRef = usePrevious(isOnTop);
|
let isOnTopRef = usePrevious(isOnTop);
|
||||||
|
|
||||||
@@ -240,7 +241,9 @@ export default function SearchPanel({ panelInfo, isOnTop, spotlightId }) {
|
|||||||
Spotlight.resume();
|
Spotlight.resume();
|
||||||
setFirstSpot(true);
|
setFirstSpot(true);
|
||||||
if (panelInfo.currentSpot) {
|
if (panelInfo.currentSpot) {
|
||||||
Spotlight.focus(panelInfo.currentSpot);
|
if (panels[panels.length - 1]?.name === "searchpanel") {
|
||||||
|
Spotlight.focus(panelInfo.currentSpot);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, 0);
|
}, 0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user