From 20ba04d8588a7dfa6f65b1c080d6373631449f59 Mon Sep 17 00:00:00 2001 From: dujinkim 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-sort-list.tsx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'components/data-table/data-table-sort-list.tsx') diff --git a/components/data-table/data-table-sort-list.tsx b/components/data-table/data-table-sort-list.tsx index 21926f34..85484b09 100644 --- a/components/data-table/data-table-sort-list.tsx +++ b/components/data-table/data-table-sort-list.tsx @@ -108,6 +108,13 @@ export function DataTableSortList({ () => table .getAllColumns() + .flatMap((column) => { + // 그룹 컬럼이면 leaf 컬럼만 추출 + if (column.columns && column.columns.length > 0) { + return column.columns.filter(c => c.getCanSort()); + } + return column.getCanSort() ? [column] : []; + }) .filter( (column) => column.getCanSort() && !sorting.some((s) => s.id === column.id) -- cgit v1.2.3