Split the fill seam where ownership splits: the shell bounds, the page fills
CI / full-gate (push) Successful in 3m1s

This commit is contained in:
2026-09-09 14:11:10 +02:00
parent 11ba843ab1
commit 4ae9326741
10 changed files with 95 additions and 25 deletions
+5 -1
View File
@@ -5,6 +5,9 @@
caption?, selectable?, actions? sr-only caption; toggle the check / kebab columns
actionsId? id stem for the row-action menus (default `row-actions`);
name it when two tables share a page
fills? take the leftover height and scroll, so the header stays
put — needs the shell's `fill: true` and a flex chain
above (README → the app shell)
columns: { label, sortable?, sort?: "asc"|"desc", href?, className? }[]
rows: { name?, cells: Cell[], actions?: Action[] }[]
Cell ∈ string | { text, className? } | { user:{name,initials} } | { rowHeader:{text,href?} } | { badge:{tone,label} } | { html, className? }
@@ -20,8 +23,9 @@
const rows = locals.rows || [];
const emptyText = locals.emptyText || t("table.empty"); // shown when a table that has columns has no rows
const actionsId = locals.actionsId || "row-actions";
const fills = locals.fills === true;
-%>
<div class="table-wrap">
<div class="table-wrap<%= fills ? " scroll-region" : "" %>">
<table class="table">
<% if (caption) { -%>
<caption class="sr-only"><%= caption %></caption>