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",
|
accessorKey: "repoDisplayName",
|
||||||
header: 'Repository',
|
header: 'Repository',
|
||||||
|
size: 500,
|
||||||
cell: ({ row: { original: { repoId, repoName, repoDisplayName, imageUrl } } }) => {
|
cell: ({ row: { original: { repoId, repoName, repoDisplayName, imageUrl } } }) => {
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-row items-center gap-3 py-2">
|
<div className="flex flex-row items-center gap-3 py-2">
|
||||||
|
|
@ -110,6 +111,7 @@ export const columns = (domain: string): ColumnDef<RepositoryColumnInfo>[] => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
accessorKey: "status",
|
accessorKey: "status",
|
||||||
|
size: 150,
|
||||||
header: ({ column }) => {
|
header: ({ column }) => {
|
||||||
const uniqueLabels = Object.values(statusLabels);
|
const uniqueLabels = Object.values(statusLabels);
|
||||||
const currentFilter = column.getFilterValue() as string | undefined;
|
const currentFilter = column.getFilterValue() as string | undefined;
|
||||||
|
|
@ -163,6 +165,7 @@ export const columns = (domain: string): ColumnDef<RepositoryColumnInfo>[] => [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
accessorKey: "lastIndexed",
|
accessorKey: "lastIndexed",
|
||||||
|
size: 150,
|
||||||
header: ({ column }) => (
|
header: ({ column }) => (
|
||||||
<div className="w-[150px]">
|
<div className="w-[150px]">
|
||||||
<Button
|
<Button
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,10 @@ export function DataTable<TData, TValue>({
|
||||||
<TableRow key={headerGroup.id}>
|
<TableRow key={headerGroup.id}>
|
||||||
{headerGroup.headers.map((header) => {
|
{headerGroup.headers.map((header) => {
|
||||||
return (
|
return (
|
||||||
<TableHead key={header.id}>
|
<TableHead
|
||||||
|
key={header.id}
|
||||||
|
style={{ width: `${header.getSize()}px` }}
|
||||||
|
>
|
||||||
{header.isPlaceholder
|
{header.isPlaceholder
|
||||||
? null
|
? null
|
||||||
: flexRender(
|
: flexRender(
|
||||||
|
|
@ -106,7 +109,10 @@ export function DataTable<TData, TValue>({
|
||||||
data-state={row.getIsSelected() && "selected"}
|
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>
|
||||||
))}
|
))}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue