From ff2c596865457589cee737f6b4eb20770780cc8d Mon Sep 17 00:00:00 2001 From: caadiq Date: Sat, 10 Jan 2026 10:16:19 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EA=B2=80=EC=83=89=20=EC=8B=9C=20?= =?UTF-8?q?=EC=8A=A4=ED=81=AC=EB=A1=A4=20=EC=9C=84=EC=B9=98=20=EC=B4=88?= =?UTF-8?q?=EA=B8=B0=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - searchTerm 변경 시 scrollContainerRef.scrollTop = 0 적용 - 검색 취소 후 재검색 시 맨 위부터 표시 --- frontend/src/pages/mobile/public/Schedule.jsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/src/pages/mobile/public/Schedule.jsx b/frontend/src/pages/mobile/public/Schedule.jsx index d3d6ad9..1617fb9 100644 --- a/frontend/src/pages/mobile/public/Schedule.jsx +++ b/frontend/src/pages/mobile/public/Schedule.jsx @@ -66,6 +66,13 @@ function MobileSchedule() { overscan: 5, // 버퍼 아이템 수 }); + // 검색어 변경 시 스크롤 위치 초기화 + useEffect(() => { + if (scrollContainerRef.current && searchTerm) { + scrollContainerRef.current.scrollTop = 0; + } + }, [searchTerm]); + useEffect(() => { if (inView && hasNextPage && !isFetchingNextPage && isSearchMode && searchTerm) { fetchNextPage();