[251211] fix: IntroPanel.new.jsx 포커스 조정-2
🕐 커밋 시간: 2025. 12. 11. 17:08:47 📊 변경 통계: • 총 파일: 1개 • 추가: +8줄 • 삭제: -13줄 📝 수정된 파일: ~ com.twin.app.shoptime/src/views/IntroPanel/IntroPanel.new.jsx 🔧 주요 변경 내용: • 코드 정리 및 최적화 Performance: 코드 최적화로 성능 개선 기대
This commit is contained in:
@@ -53,7 +53,7 @@ import { types } from "../../actions/actionTypes";
|
||||
import { focusById } from "../../utils/spotlight-utils";
|
||||
|
||||
const Container = SpotlightContainerDecorator(
|
||||
{ enterTo: "last-focused" },
|
||||
{ enterTo: "#selectAllCheckbox" },
|
||||
"div",
|
||||
);
|
||||
|
||||
@@ -845,26 +845,21 @@ function IntroPanelWithOptional({
|
||||
//20250903 pjh
|
||||
//selectAll에서 포커스 올렸을때 처리 변경.
|
||||
const onSelectAllSpotlightUp = () => {
|
||||
const focusTimer = setTimeout(() => {
|
||||
Spotlight.focus("optionalCheckbox");
|
||||
setTimeout(() => {
|
||||
focusById("optionalCheckbox");
|
||||
}, 10);
|
||||
return () => {
|
||||
clearTimeout(focusTimer);
|
||||
};
|
||||
// focusById("optionalCheckbox");
|
||||
};
|
||||
|
||||
//Optional terms 체크박스가 체크가 되어있을때 아래로 내리면(3개전부 체크기준) agree로 가고, 아닐경우 select all로 포커스이동해야함.
|
||||
const onOptionalTermSpotlightDown = () => {
|
||||
const focusTimer = setTimeout(() => {
|
||||
setTimeout(() => {
|
||||
if (termsChecked && privacyChecked && optionalChecked) {
|
||||
Spotlight.focus("agreeButton");
|
||||
focusById("agreeButton");
|
||||
} else {
|
||||
Spotlight.focus("selectAllCheckbox");
|
||||
focusById("selectAllCheckbox");
|
||||
}
|
||||
}, 10);
|
||||
return () => {
|
||||
clearTimeout(focusTimer);
|
||||
};
|
||||
};
|
||||
|
||||
// useEffect(() => {
|
||||
@@ -905,7 +900,7 @@ function IntroPanelWithOptional({
|
||||
handleCancel={onCancel}
|
||||
spotlightId={spotlightId}
|
||||
>
|
||||
<Container className={css.introLayout} defaultElement="selectAllCheckbox" {...rest}>
|
||||
<Container className={css.introLayout} defaultElement="#selectAllCheckbox" {...rest}>
|
||||
{/* 첫 번째 영역: 헤더 섹션 */}
|
||||
<div className={css.headerSection}>
|
||||
<div className={css.titleContainer}>
|
||||
|
||||
Reference in New Issue
Block a user