import { ColumnDef } from '@tanstack/react-table'; import { CollapseExpandButton } from '../CollapseExpandButton'; import { DefaultType } from './types'; export function buildExpandColumn(): ColumnDef { return { id: 'expand', header: ({ table }) => { const hasExpandableItems = table.getCanSomeRowsExpand(); return ( hasExpandableItems && ( ) ); }, cell: ({ row }) => row.getCanExpand() && ( ), enableColumnFilter: false, enableGlobalFilter: false, enableHiding: false, meta: { width: 40, }, }; }