fix(ui): tables no longer overflow their grid column

CSS grid tracks named '1fr' have an implicit 'min-width: auto' that defers
to the child's intrinsic minimum content size. With wide tables inside
those tracks (Ürünler, Hastalar, dashboard recent jobs) that minimum was
the full table width, so the column blew past its share of the row and
the table's overflow-x-auto wrapper never got a chance to do its job —
the whole page scrolled horizontally instead.

Switched the offending tracks to 'minmax(0,1fr)' which lets them collapse
to zero and lets the table primitive's own overflow handle horizontal
scroll inside the cell as designed.

Touched:
  - /products  grid-cols-[1fr_360px]  → [minmax(0,1fr)_360px]
  - /patients  grid-cols-[1fr_360px]  → [minmax(0,1fr)_360px]
  - /dashboard grid-cols-[2fr_1fr]    → [minmax(0,2fr)_minmax(0,1fr)]

Small inline forms ([1fr_auto], [1fr_100px]) were left as-is — they don't
host tables.
This commit is contained in:
kovakmedya
2026-05-21 22:38:03 +03:00
parent dff1e8d1a7
commit 4f920e98fc
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ export default async function PatientsPage() {
</p>
</div>
<div className="grid gap-6 lg:grid-cols-[1fr_360px]">
<div className="grid gap-6 lg:grid-cols-[minmax(0,1fr)_360px]">
<Card>
<CardHeader>
<CardTitle>Hasta Listesi</CardTitle>