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();