Table Mode
Table mode renders data as a structured grid with column headers, sortable columns, and row-level comparisons. It is the best choice when users need to scan many records across multiple fields simultaneously.
The primary structural decision is type:
traditional— classic row/column table with optional striping, hover, and separatorsrich-cells— multi-column cell blocks per row; better for records with many fields at a glance
Shared Behavior
Shared content behavior remains canonical in Reference:
- Content Config: Pagination and Search
- Content Config: Static Filtering and Sorting
- Content Config: Actions and Interactions
- Content Config: Shape for responsive breakpoints and shared content contract fields
For field-level controls (label, width, alignment, renderAs, groupable, sortable), see Field Config.
Core Examples
Traditional Table
Default table shape with header, hover, alternating rows, and row separators.
modeConfig: {
table: {
type: 'traditional',
alternatingRows: true,
hover: true,
showHeader: true,
rowSeparator: true,
},
}
Rich Cells
The same dataset with rich-cells layout — multiple fields per row block, no column header.
modeConfig: {
table: {
type: 'rich-cells',
columns: 2,
showHeader: false, // rich-cells has no meaningful column header
hover: true,
},
}
Presentation Toggles
A minimal table surface with hover, header, striping, and row separators all disabled.
modeConfig: {
table: {
type: 'traditional',
hover: false,
showHeader: false,
alternatingRows: false,
rowSeparator: false,
},
}
Conditional Row Styling
Each row is colored based on its status value via conditionalBackgroundColor.
modeConfig: {
table: {
type: 'traditional',
alternatingRows: false,
conditionalBackgroundColor: (entity) => {
if (entity.status === 'active') return { backgroundColor: '#16a34a', color: '#f0fdf4' };
if (entity.status === 'pending') return { backgroundColor: '#d97706', color: '#fffbeb' };
return { backgroundColor: '#4f46e5', color: '#eef2ff' };
},
},
}
Grouping UI Controls
Grouping is configured under zones.content.groupings; the canonical contract and cross-mode behavior live in Content Config: Grouping.
This section is intentionally table-specific and focuses on grouping interaction surfaces that apply only in table mode.
| Option | Values | Default | Effect |
|---|---|---|---|
| showDropdownControl | true or false | false | Shows the group-by dropdown control above the table. |
| showHeaderControls | true or false | true | Shows grouping icons in header cells for groupable fields. |
Dropdown visibility still requires at least one field with groupable: true so the control has selectable columns.
Dropdown Only
Only the dropdown is shown. Header grouping icons are disabled.
// In zones.content.groupings:
{ fieldKey: 'team', showDropdownControl: true, showHeaderControls: false }
Header Icons Only
Only header grouping icons are shown on groupable columns.
// In zones.content.groupings:
{ fieldKey: 'team', showHeaderControls: true }
Dropdown and Header Icons
Both grouping control surfaces are enabled.
// In zones.content.groupings:
{ fieldKey: 'team', showDropdownControl: true, showHeaderControls: true }
Hook Callbacks
Sort headers and grouping controls trigger the hook callbacks below. Open the browser console to see output.
preRowRender receives each entity before it renders and returns the (optionally transformed) entity — useful for normalizing display values or injecting computed fields without modifying the source data.
Sort and group interactions trigger table hook callbacks — check the browser console.
modeConfig: {
table: {
hooks: {
onSort: (field, direction) => console.log('sort changed', field, direction),
onGroup: (field) => console.log('group changed', field),
onGroupToggle: (groupValue, isExpanded) => console.log('group toggle', groupValue, isExpanded),
// preRowRender: (entity) => ({ ...entity, name: entity.name.toUpperCase() }),
},
},
}
See Also
- Table Mode Config — full
modeConfig.tableoptions, caveats, and coverage summary - Content Config
- Field Config
- Host CSS and Table Layout