Files
decePubClient/Components/Daisy/DataDisplay/DTable.razor
T
thepraandClaude Opus 5.5 ed3bf57e5b Small screens, small things; CLAUDE.md on phones
On touch the "on the wall of" link gets a 44px hit area (it truncates, so padding), an event's venue address wraps,
and on a phone toasts sit above the round New post button. A table's scroll box and the administration's statistics
strip are marked as strips that scroll sideways on purpose (data-scroll-x), which the phone sweep allows. CLAUDE.md gains
a Phones section: width variants for layout and the pointer for hit sizes, touch.css, the 44px rule, the bottom sheets
(ResponsiveBottom, SheetOnNarrow, PhoneSheet), Back closing overlays (IDOverlayHost, OverlayService), ConfirmService,
what a tap does on touch, the feed on a phone; and the phone tests under Testing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
2026-10-07 00:20:56 +02:00

42 lines
1.6 KiB
Plaintext

@inherits DComponentBase
@* daisyUI Table: https://daisyui.com/components/table/ . ChildContent is the <thead>/<tbody>/<tfoot> markup. Class and
the other attributes go on the <table>; with Scroll (the default) it sits in an overflow-x-auto div, whose classes
are WrapperClass (pinned rows need it to have a height, e.g. h-96); it is marked as a strip that scrolls sideways on
purpose (data-scroll-x), which the phone tests allow. *@
@if (Scroll)
{
<div class="@Cx("overflow-x-auto", WrapperClass)" data-scroll-x>
<table @attributes="AdditionalAttributes" class="@CssClass">@ChildContent</table>
</div>
}
else
{
<table @attributes="AdditionalAttributes" class="@CssClass">@ChildContent</table>
}
@code {
[Parameter] public RenderFragment ChildContent { get; set; }
[Parameter] public DSize Size { get; set; }
[Parameter] public bool Zebra { get; set; }
/// <summary>Sticky thead/tfoot rows while the wrapper scrolls vertically.</summary>
[Parameter] public bool PinRows { get; set; }
/// <summary>Sticky &lt;th&gt; columns while the wrapper scrolls horizontally.</summary>
[Parameter] public bool PinCols { get; set; }
/// <summary>Wrap the table in an overflow-x-auto div so it scrolls on narrow screens.</summary>
[Parameter] public bool Scroll { get; set; } = true;
[Parameter] public string WrapperClass { get; set; }
string CssClass => Cx("table", Zebra ? "table-zebra" : null, PinRows ? "table-pin-rows" : null,
PinCols ? "table-pin-cols" : null, SizeClass, Class);
string SizeClass => Size switch
{
DSize.Xs => "table-xs",
DSize.Sm => "table-sm",
DSize.Lg => "table-lg",
DSize.Xl => "table-xl",
_ => null
};
}