diff --git a/src/renderer/components/table/react-table.tsx b/src/renderer/components/table/react-table.tsx index 8245c227f9..4b05a1df8a 100644 --- a/src/renderer/components/table/react-table.tsx +++ b/src/renderer/components/table/react-table.tsx @@ -3,9 +3,9 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ -import React from "react"; +import React, { CSSProperties } from "react"; import { flexRender } from '@tanstack/react-table' -import type { Table } from "@tanstack/react-table"; +import type { Table, Header, Cell } from "@tanstack/react-table"; import { TableHeader } from "./table-header"; interface TableProps { @@ -17,7 +17,7 @@ export function Table({ className, table }: TableProps) { return (
- + {table.getRowModel().rows.map(row => ( @@ -33,3 +33,9 @@ export function Table({ className, table }: TableProps) { ) } + +function getWidthStyles(table: Table, cell: Cell | Header): CSSProperties { + return { + width: cell.column.getSize(), + } +}