diff --git a/web/src/app/_DataTable/DataTable.tsx b/web/src/app/_DataTable/DataTable.tsx index 5e71e56c..833e9424 100644 --- a/web/src/app/_DataTable/DataTable.tsx +++ b/web/src/app/_DataTable/DataTable.tsx @@ -38,8 +38,14 @@ export function DataTable({ {table.getHeaderGroups().map((headerGroup) => ( {headerGroup.headers.map((header) => { + if (!header.column.columnDef.header) return null; + console.log("ASDSAD", (header.column.columnDef as any).colSpan); return ( - + {header.isPlaceholder ? null : flexRender( diff --git a/web/src/app/_DataTable/columns.tsx b/web/src/app/_DataTable/columns.tsx index e8a74466..573e1fed 100644 --- a/web/src/app/_DataTable/columns.tsx +++ b/web/src/app/_DataTable/columns.tsx @@ -25,20 +25,39 @@ const AmountHeader = () => { ); }; -export const columns: ColumnDef[] = [ +export const columns: (ColumnDef & { colSpan?: number })[] = [ { accessorKey: "value", header: "Value", cell: ({ row }) => usdFormat(row.original.value), }, { - id: "amount", + id: "amountFrom", header: () => , + colSpan: 3, cell: ({ row }) => { return (
- {row.original.amountFrom} {"->"} + {row.original.amountFrom} +
+ ); + }, + }, + { + id: "amountIcon", + header: undefined, + cell: () => { + return {"->"}; + }, + }, + { + id: "amountTo", + header: undefined, + cell: ({ row }) => { + return ( +
+ {row.original.amountTo}
); diff --git a/web/src/components/ui/table.tsx b/web/src/components/ui/table.tsx index cdb57a2c..c195ef1b 100644 --- a/web/src/components/ui/table.tsx +++ b/web/src/components/ui/table.tsx @@ -73,7 +73,7 @@ const TableHead = React.forwardRef<