fix(ui): Card gets min-w-0 so children inside grid tracks can shrink

Even after switching the page-level grid columns to minmax(0,1fr), the
Card primitive itself was still bringing its intrinsic min-content into
the column — every Card defaults to 'min-width: auto', and a Card with
a wide table inside resolves min-content to the table width. That meant
the column still couldn't collapse and the table's overflow-x-auto
wrapper never saw a constrained parent, so the action buttons spilled
past the Card border.

Added 'min-w-0' to Card and CardContent so:
  - the Card collapses to whatever the grid track allows;
  - CardContent collapses inside the Card, letting the Table wrapper
    finally enforce its overflow-x-auto scroll.

Also fixed two inner form grids that had the same '1fr' overflow trap:
ProstheticForm and ProstheticsTable's edit dialog both use a
[price][currency] split, switched to minmax(0,1fr)_100px so the 'Para
birimi' label / TRY value no longer get pushed past the form edge.
This commit is contained in:
kovakmedya
2026-05-21 22:40:44 +03:00
parent 4f920e98fc
commit 90abb398fa
3 changed files with 4 additions and 4 deletions
@@ -65,7 +65,7 @@ export function ProstheticForm({ defaultCurrency }: { defaultCurrency: string })
)}
</div>
<div className="grid gap-2 grid-cols-[1fr_100px]">
<div className="grid gap-2 grid-cols-[minmax(0,1fr)_100px]">
<div className="grid gap-2">
<Label htmlFor="unitPrice">Birim Fiyatı *</Label>
<Input
@@ -286,7 +286,7 @@ function EditDialog({
</SelectContent>
</Select>
</div>
<div className="grid grid-cols-[1fr_100px] gap-3">
<div className="grid grid-cols-[minmax(0,1fr)_100px] gap-3">
<div className="grid gap-2">
<Label htmlFor={`edit-price-${row.$id}`}>Birim Fiyatı *</Label>
<Input