EnTableRowDetail
Renders a data row plus an expandable detail row as sibling <tr>s, so it drops straight into a table <tbody> — including EnTableBasic and EnTableSortable, via their body slot. A leading caret cell toggles the detail row; the open row and its detail read as one highlighted block, with the detail content in a rounded white card that spans the full table width.
Use it for progressive disclosure in dense tables — a nested breakdown table, an audit trail, or extended record fields — without navigating away from the list. This is the expandable table row (master-detail) pattern: each row is a summary that expands and collapses to reveal the structured detail behind it — either as a nested table in the colspanned card (default), or, with detail-as-rows, as sibling rows whose cells line up under the parent table's own column headers.
Preview
Props
| Name | Description | Default | Control |
|---|---|---|---|
| colspan | Total number of columns in the table. The detail row spans all of them.
Only used by the default (colspanned card) layout — ignored when
number | null | |
| toggleCell | Whether to render the built-in leading caret cell. Set to false to drive
the row from a trigger in one of your own cells instead — the default slot
exposes boolean | true | |
| detailAsRows | Render the boolean | false | |
| expandable | Whether this row can expand. When false, no caret renders and the detail row is never shown (the leading cell stays in place to keep columns aligned). boolean | true | |
| initialOpen | Whether the detail row starts open. boolean | false | |
| openLabel | Accessible label for the toggle when collapsed. string | "Expand row" | |
| closeLabel | Accessible label for the toggle when expanded. string | "Collapse row" |
Slots
default
No description
Variables
| Name | Type | Description |
|---|---|---|
is-open | unknown | — |
toggle | unknown | — |
detail
No description
Variables
| Name | Type | Description |
|---|---|---|
is-open | unknown | — |
toggle | unknown | — |
row-class | unknown | — |
Events
open
emitted when the detail row opens
close
emitted when the detail row closes
Methods
No methods defined.
Examples
Mixed expandable and fixed rows
Set expandable to false on rows with nothing to reveal — the caret is omitted but the leading cell stays in place so columns keep their alignment. In the default card layout, colspan must equal the table's total column count (data columns plus the toggle column) so the detail row spans the full width. Here the rows live in EnTableBasic via its body slot, which replaces the auto-generated rows.
Sub-rows aligned to the parent columns, inside a sortable table
With detail-as-rows, the detail slot renders bare <tr>s as siblings of the data row instead of a colspanned card, so the expanded cells line up under the parent table's own column headers (colspan is ignored in this layout). Rows stay collapsed until the count in the Plan column is clicked — the trigger lives in a data cell (:toggle-cell="false", so no spacer column), using the default slot's is-open and toggle bindings; single-plan carriers show their plan inline and set :expandable="false". Put the row-class binding on each detail <tr> so it picks up the open-block highlight. The whole thing sits in EnTableSortable via its body slot — sorting reorders the parent rows and the details travel with them. Note the Amount column: the row data keeps it as a number and the cell formats it to currency at render — a preformatted string would break numeric sorting.