mirror of
https://github.com/documenso/documenso.git
synced 2026-07-27 18:35:05 +10:00
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:
@@ -82,6 +82,7 @@ export const DocumentsDataTable = ({
|
|||||||
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',
|
||||||
|
|||||||
@@ -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()}px`,
|
||||||
|
}}
|
||||||
|
>
|
||||||
{flexRender(cell.column.columnDef.cell, cell.getContext())}
|
{flexRender(cell.column.columnDef.cell, cell.getContext())}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
--ring: 95.08 71.08% 67.45%;
|
--ring: 95.08 71.08% 67.45%;
|
||||||
|
|
||||||
--radius: 0.5rem;
|
--radius: 0.5rem;
|
||||||
|
|
||||||
--warning: 54 96% 45%;
|
--warning: 54 96% 45%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -91,6 +91,11 @@
|
|||||||
@apply border-border;
|
@apply border-border;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html,
|
||||||
|
body {
|
||||||
|
scrollbar-gutter: stable;
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
@apply bg-background text-foreground;
|
@apply bg-background text-foreground;
|
||||||
font-feature-settings: 'rlig' 1, 'calt' 1;
|
font-feature-settings: 'rlig' 1, 'calt' 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user