From 61237b1383206692e9d2043a3a39a9891c041bd8 Mon Sep 17 00:00:00 2001 From: kenneth Date: Mon, 15 Sep 2025 23:27:56 +0000 Subject: [PATCH] feat: tweak file table col sizes --- src/files/file-table.tsx | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/src/files/file-table.tsx b/src/files/file-table.tsx index 967a772..9b2c479 100644 --- a/src/files/file-table.tsx +++ b/src/files/file-table.tsx @@ -72,6 +72,7 @@ const columns: ColumnDef[] = [ ), enableSorting: false, enableHiding: false, + size: 24, }, { header: "Name", @@ -82,13 +83,14 @@ const columns: ColumnDef[] = [ return case "directory": return ( -
+
{row.original.doc.name}
) } }, + size: 1000, }, { header: "Size", @@ -217,7 +219,10 @@ export function FileTableContent() { {table.getHeaderGroups().map((headerGroup) => ( {headerGroup.headers.map((header) => ( - + {header.isPlaceholder ? null : flexRender( @@ -240,7 +245,10 @@ export function FileTableContent() { }} > {row.getVisibleCells().map((cell) => ( - + {flexRender( cell.column.columnDef.cell, cell.getContext(), @@ -250,14 +258,7 @@ export function FileTableContent() { )) ) : ( - - - No results. - - + )} @@ -266,6 +267,20 @@ export function FileTableContent() { ) } +function NoResultsRow() { + const newItemKind = useAtomValue(newItemKindAtom) + if (newItemKind) { + return null + } + return ( + + + No results. + + + ) +} + function NewItemRow() { const inputRef = useRef(null) const newItemFormId = useId() @@ -363,7 +378,7 @@ function NewItemRow() { function FileNameCell({ initialName }: { initialName: string }) { return ( -
+
{initialName}