diff options
Diffstat (limited to 'components/client-data-table/data-table-group-list.tsx')
| -rw-r--r-- | components/client-data-table/data-table-group-list.tsx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/components/client-data-table/data-table-group-list.tsx b/components/client-data-table/data-table-group-list.tsx index 519b7327..6fe738e2 100644 --- a/components/client-data-table/data-table-group-list.tsx +++ b/components/client-data-table/data-table-group-list.tsx @@ -55,6 +55,12 @@ export function ClientDataTableGroupList<TData>({ () => table .getAllColumns() + .flatMap((column) => { + if (column.columns && column.columns.length > 0) { + return column.columns.filter(c => c.getCanGroup()); + } + return column.getCanGroup() ? [column] : []; + }) .filter((col) => col.getCanGroup?.() !== false) .map((col) => { // If meta?.excelHeader is missing or undefined, fall back to `col.id` |
