From 35f3c694be00170e244190364d24a5ac56f0d59f Mon Sep 17 00:00:00 2001 From: Jay Sheen Date: Fri, 17 Oct 2025 16:10:15 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A9=94=EB=89=B4=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EC=98=A4=ED=94=88=20=EC=8B=9C=20=EC=B4=88=EA=B8=B0?= =?UTF-8?q?=20=EC=83=81=ED=83=9C=EB=A1=9C=20=EB=A6=AC=EC=85=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 메뉴가 열릴 때마다 스크롤 위치와 선택 상태 초기화 - 메뉴 리스트 스크롤을 맨 위로 이동 - 카테고리 버튼 스크롤을 맨 왼쪽으로 이동 - 선택된 버튼 인덱스를 0으로 초기화 (거래조회 선택) - 이전 상태가 아닌 항상 초기화된 상태로 표시 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/shared/ui/menu/index.tsx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/shared/ui/menu/index.tsx b/src/shared/ui/menu/index.tsx index d02f806..fb637d5 100644 --- a/src/shared/ui/menu/index.tsx +++ b/src/shared/ui/menu/index.tsx @@ -203,6 +203,23 @@ export const Menu = ({ setEditMode(favoriteEdit) } },[favoriteEdit]); + + // 메뉴가 열릴 때 초기화 + useEffect(() => { + if (menuOn) { + // 스크롤 위치 초기화 + if (scrollRef.current) { + scrollRef.current.scrollTop = 0; + } + if (shortBtnScrollRef.current) { + shortBtnScrollRef.current.scrollLeft = 0; + } + // 선택된 버튼 인덱스 초기화 + setShortBtnIdx(0); + // lastScrollTop 초기화 + lastScrollTop.current = 0; + } + }, [menuOn]); return ( <>