fix: table layout shift while changing tabs (#921)

fixes: #875 



https://github.com/documenso/documenso/assets/28510494/083fd87a-ef62-40e6-9696-9c04b4411502
This commit is contained in:
Lucas Smith
2024-03-11 12:16:19 +11:00
committed by GitHub
3 changed files with 13 additions and 2 deletions

View File

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

View File

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

View File

@ -81,7 +81,7 @@
--ring: 95.08 71.08% 67.45%;
--radius: 0.5rem;
--warning: 54 96% 45%;
}
}
@ -91,6 +91,11 @@
@apply border-border;
}
html,
body {
scrollbar-gutter: stable;
}
body {
@apply bg-background text-foreground;
font-feature-settings: 'rlig' 1, 'calt' 1;