From cb4054e9e70f98c44884a45dc3b4c5fb7d1c8afb Mon Sep 17 00:00:00 2001 From: kric_jspark Date: Thu, 23 Jul 2026 09:15:39 +0900 Subject: [PATCH] =?UTF-8?q?260723=5F01=5FENH:=20=EB=AA=A8=EB=8B=88?= =?UTF-8?q?=ED=84=B0=EB=A7=81=20=EB=B0=B0=EC=A0=95=20=EB=8B=A4=EC=9D=B4?= =?UTF-8?q?=EC=96=BC=EB=A1=9C=EA=B7=B8=20=EB=94=94=ED=8F=B4=ED=8A=B8=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=82=AC=EC=9D=B4=EC=A6=88=20?= =?UTF-8?q?=EB=B3=80=EB=8F=99=20=EC=A0=81=EC=9A=A9=20=EB=90=98=EA=B2=8C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ src/components/data-table/DataTable.tsx | 8 +++++++ .../dialog/AssignMonitoringDialog.tsx | 22 ++++++++++--------- 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 5ef6a52..40c5333 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,5 @@ yarn-error.log* # typescript *.tsbuildinfo next-env.d.ts + +.idea \ No newline at end of file diff --git a/src/components/data-table/DataTable.tsx b/src/components/data-table/DataTable.tsx index bfc0eee..e588e54 100644 --- a/src/components/data-table/DataTable.tsx +++ b/src/components/data-table/DataTable.tsx @@ -92,6 +92,14 @@ export function DataTable({ } }, [rowSelection, selectMode]) + useEffect(() => { + setPagination(prev => ({ + ...prev, + pageIndex: 0, + pageSize: Math.max(1, defaultPageSize), + })) + }, [defaultPageSize]) + // selectMode에 따라 select column 추가 const enhancedColumns: DataTableColumn[] = [ ...(isNotSelection diff --git a/src/components/dialog/AssignMonitoringDialog.tsx b/src/components/dialog/AssignMonitoringDialog.tsx index 5d7a77c..d40387b 100644 --- a/src/components/dialog/AssignMonitoringDialog.tsx +++ b/src/components/dialog/AssignMonitoringDialog.tsx @@ -202,16 +202,18 @@ export function AssignMonitoringDialog({
{confirmedCount}
- row.userId} - defaultPageSize={applyUsers.length || 10} - pageSizeOptions={[applyUsers.length || 10]} - showPagination={false} - selectMode="click-event" - onRowClick={toggleApplyUser} - /> +
+ row.userId} + defaultPageSize={applyUsers.length} + pageSizeOptions={[applyUsers.length]} + showPagination={false} + selectMode="click-event" + onRowClick={toggleApplyUser} + /> +
-- 2.49.0.windows.1