A cell inside a PhoenixPaper.TableRow (pp_table_cell/1) — renders a
<th> when variant="head", a <td> otherwise. See
PhoenixPaper.Table's moduledoc for a full example.
sortable turns a head cell into MUI's TableSortLabel equivalent: a
clickable button with a direction arrow, styled by sort_direction
(nil — sortable but not the active column, "asc", or "desc"). Unlike
MUI, this is presentation only — there's no click handling built in, wire
your own phx-click/phx-value-* via the normal global attrs (e.g.
phx-click="sort" phx-value-column="name"); the LiveView owns which
column is active and in which direction, the same as it owns the actual
sorted data. rest lands on the <button> when sortable, or on the
<th>/<td> itself otherwise (e.g. for colspan/rowspan).
Summary
Functions
Renders a table cell. See the module doc.
Functions
Renders a table cell. See the module doc.
Attributes
paperize(:boolean) - Defaults totrue.variant(:string) - Defaults to"body". Must be one of"head", or"body".align(:string) - Defaults to"left". Must be one of"left","center", or"right".sortable(:boolean) - renders a clickable sort-direction arrow — only meaningful with variant="head". Defaults tofalse.sort_direction(:string) - nil (sortable but inactive) | "asc" | "desc" — only meaningful with sortable. Defaults tonil.class(:any) - Defaults tonil.- Global attributes are accepted. Supports all globals plus:
["colspan", "rowspan"].
Slots
inner_block(required)