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/data-table/data-table-group-list.tsx | 6 ++++++
 1 file changed, 6 insertions(+)

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

diff --git a/components/data-table/data-table-group-list.tsx b/components/data-table/data-table-group-list.tsx
index 213b429f..c00fac42 100644
--- a/components/data-table/data-table-group-list.tsx
+++ b/components/data-table/data-table-group-list.tsx
@@ -85,6 +85,12 @@ export function DataTableGroupList<TData>({
     () =>
       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.getCanGroup?.() !== false)
         .map((col) => ({
           id: col.id,
-- 
cgit v1.2.3

