|
|
@@ -28,6 +28,11 @@ export default function SearchResultsTable({ routeBranch, scope, items }) {
|
|
|
|
|
|
const list = Array.isArray(items) ? items : [];
|
|
|
|
|
|
+ // UI fix:
|
|
|
+ // - In `table-fixed` layouts, the action column must be wide enough for two buttons.
|
|
|
+ // - We keep the buttons content-sized (no hard w-36 per button) and prevent shrink.
|
|
|
+ const ACTIONS_COL_WIDTH = "w-56"; // ~14rem (tweak to w-52/w-60 if you prefer)
|
|
|
+
|
|
|
return (
|
|
|
<Table className="table-fixed">
|
|
|
<TableCaption>
|
|
|
@@ -44,8 +49,10 @@ export default function SearchResultsTable({ routeBranch, scope, items }) {
|
|
|
<TableHead>Datei</TableHead>
|
|
|
<TableHead className="hidden md:table-cell">Pfad</TableHead>
|
|
|
|
|
|
- {/* Fixed actions column so buttons are always reachable without scrolling. */}
|
|
|
- <TableHead className="w-40 text-right">Aktionen</TableHead>
|
|
|
+ {/* Fixed actions column: wide enough for two buttons side-by-side */}
|
|
|
+ <TableHead className={`${ACTIONS_COL_WIDTH} text-right`}>
|
|
|
+ Aktionen
|
|
|
+ </TableHead>
|
|
|
</TableRow>
|
|
|
</TableHeader>
|
|
|
|
|
|
@@ -110,14 +117,14 @@ export default function SearchResultsTable({ routeBranch, scope, items }) {
|
|
|
</span>
|
|
|
</TableCell>
|
|
|
|
|
|
- {/* Actions: fixed-width column, buttons stacked to keep width small and stable. */}
|
|
|
- <TableCell className="w-40">
|
|
|
- <div className="flex gap-2">
|
|
|
+ {/* Actions: side-by-side, right-aligned, no fixed per-button width */}
|
|
|
+ <TableCell className={ACTIONS_COL_WIDTH}>
|
|
|
+ <div className="flex items-center justify-end gap-2">
|
|
|
<Button
|
|
|
variant="outline"
|
|
|
size="sm"
|
|
|
asChild
|
|
|
- className="w-36 justify-start"
|
|
|
+ className="shrink-0"
|
|
|
>
|
|
|
<a
|
|
|
href={pdfUrl}
|
|
|
@@ -135,7 +142,7 @@ export default function SearchResultsTable({ routeBranch, scope, items }) {
|
|
|
variant="outline"
|
|
|
size="sm"
|
|
|
asChild
|
|
|
- className="w-36 justify-start"
|
|
|
+ className="shrink-0"
|
|
|
>
|
|
|
<Link href={dayHref} title="Zum Ordner">
|
|
|
<FolderOpen className="h-4 w-4" />
|