fix: SearchModal 페이지네이션 초기화

This commit is contained in:
swcho
2025-07-25 18:31:09 +09:00
parent 61ed66d4f0
commit ed4279d321
@@ -167,6 +167,7 @@ const SearchModal: React.FC<SearchModalProps> = ({
// 페이지 변경 시마다 데이터 fetch
useEffect(() => {
// showTable이 true일 때만 fetch (최초 렌더 방지)
setIsResetPage(false);
if (showTable) fetchFilteredData();
}, [curPage]);
@@ -488,7 +489,7 @@ const SearchModal: React.FC<SearchModalProps> = ({
const handleSearch = () => {
// setCurPage(1); // 페이지를 1로 초기화
// setDetailCurPage(1); // 페이지를 1로 초기화
// setIsResetPage(true); // 페이지를 초기화
// setIsResetPage(false); // 페이지를 초기화
// setIsResetDetailPage(true); // 디테일 페이지를 초기화
// setIsResetSelection(true); // 선택 초기화
// setIsResetDetailSelection(true); // 선택 초기화
@@ -701,7 +702,7 @@ const SearchModal: React.FC<SearchModalProps> = ({
total={tableCount}
cellClick={activeTab === 'report' ? handleReportCellClick : handleBasicCellClick}
onPageChange={setCurPage}
resetPageNo={true}
resetPageNo={isResetPage}
resetSelection={isResetSelection}
/>
</div>