added fixed width for status col

This commit is contained in:
apoorv taneja
2024-02-08 13:31:38 +05:30
parent 8f3a52e1fd
commit 58f4b72939
2 changed files with 7 additions and 1 deletions

View File

@ -72,6 +72,7 @@ export const DocumentsDataTable = ({ results }: DocumentsDataTableProps) => {
header: 'Status', header: 'Status',
accessorKey: 'status', accessorKey: 'status',
cell: ({ row }) => <DocumentStatus status={row.getValue('status')} />, cell: ({ row }) => <DocumentStatus status={row.getValue('status')} />,
size: 140,
}, },
{ {
header: 'Actions', header: 'Actions',

View File

@ -115,7 +115,12 @@ export function DataTable<TData, TValue>({
table.getRowModel().rows.map((row) => ( table.getRowModel().rows.map((row) => (
<TableRow key={row.id} data-state={row.getIsSelected() && 'selected'}> <TableRow key={row.id} data-state={row.getIsSelected() && 'selected'}>
{row.getVisibleCells().map((cell) => ( {row.getVisibleCells().map((cell) => (
<TableCell key={cell.id}> <TableCell
key={cell.id}
style={{
width: cell.column.getSize(),
}}
>
{flexRender(cell.column.columnDef.cell, cell.getContext())} {flexRender(cell.column.columnDef.cell, cell.getContext())}
</TableCell> </TableCell>
))} ))}