mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 04:15:30 +00:00
make repository column width fixed
This commit is contained in:
parent
9faaf8d1ce
commit
3b9a504890
2 changed files with 11 additions and 2 deletions
|
|
@ -73,6 +73,7 @@ export const columns = (domain: string): ColumnDef<RepositoryColumnInfo>[] => [
|
|||
{
|
||||
accessorKey: "repoDisplayName",
|
||||
header: 'Repository',
|
||||
size: 500,
|
||||
cell: ({ row: { original: { repoId, repoName, repoDisplayName, imageUrl } } }) => {
|
||||
return (
|
||||
<div className="flex flex-row items-center gap-3 py-2">
|
||||
|
|
@ -110,6 +111,7 @@ export const columns = (domain: string): ColumnDef<RepositoryColumnInfo>[] => [
|
|||
},
|
||||
{
|
||||
accessorKey: "status",
|
||||
size: 150,
|
||||
header: ({ column }) => {
|
||||
const uniqueLabels = Object.values(statusLabels);
|
||||
const currentFilter = column.getFilterValue() as string | undefined;
|
||||
|
|
@ -163,6 +165,7 @@ export const columns = (domain: string): ColumnDef<RepositoryColumnInfo>[] => [
|
|||
},
|
||||
{
|
||||
accessorKey: "lastIndexed",
|
||||
size: 150,
|
||||
header: ({ column }) => (
|
||||
<div className="w-[150px]">
|
||||
<Button
|
||||
|
|
|
|||
|
|
@ -85,7 +85,10 @@ export function DataTable<TData, TValue>({
|
|||
<TableRow key={headerGroup.id}>
|
||||
{headerGroup.headers.map((header) => {
|
||||
return (
|
||||
<TableHead key={header.id}>
|
||||
<TableHead
|
||||
key={header.id}
|
||||
style={{ width: `${header.getSize()}px` }}
|
||||
>
|
||||
{header.isPlaceholder
|
||||
? null
|
||||
: flexRender(
|
||||
|
|
@ -106,7 +109,10 @@ export function DataTable<TData, TValue>({
|
|||
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>
|
||||
))}
|
||||
|
|
|
|||
Loading…
Reference in a new issue