From 20ba04d8588a7dfa6f65b1c080d6373631449f59 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Mon, 1 Sep 2025 10:16:13 +0000
Subject: (정희성) 테이블 sort, group 그룹핑 컬럼 호출 시 오류 수정
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 components/client-data-table/data-table-sort-list.tsx | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'components/client-data-table/data-table-sort-list.tsx')

diff --git a/components/client-data-table/data-table-sort-list.tsx b/components/client-data-table/data-table-sort-list.tsx
index b67fdde3..475a2798 100644
--- a/components/client-data-table/data-table-sort-list.tsx
+++ b/components/client-data-table/data-table-sort-list.tsx
@@ -64,6 +64,12 @@ export function ClientDataTableSortList<TData>({ table }: DataTableSortListLocal
   const sortableColumns = React.useMemo(() => {
     return table
       .getAllColumns()
+      .flatMap((column) => {
+        if (column.columns && column.columns.length > 0) {
+          return column.columns.filter(c => c.getCanSort());
+        }
+        return column.getCanSort() ? [column] : [];
+      })
       .filter((col) => col.getCanSort())
       .map((col) => ({
         id: col.id,
-- 
cgit v1.2.3

