TableColumn
TableColumn is the column-definition record used by DataTable.
A good column definition answers three things: what the column represents, how wide it should be, and whether the interface should visually hint that the column can be sorted.
Example
use fission::prelude::*;
let column = TableColumn {
id: "updated_at".into(),
title: "Updated".into(),
width: 140.0,
sortable: true,
};
Field table
| | | |
|---|
| | Stable application-level column identifier. | Required. Useful for your own sort and visibility logic. |
| | Header label shown at the top of the column. | |
| | Display width for the column. | Required. Choose widths deliberately for the data shape. |
| | Whether the header should show a sort affordance. | The checked-in table uses this only as a visual indicator. |
Specific advice
Keep ids stable even if titles are localized or renamed. Product logic should usually sort or hide columns by id, not by user-facing text.
Production checklist
For TableColumn, review the fields that change behavior before treating the widget as finished: id, title, width, sortable. The goal is to make the product rule visible in state and actions, not hidden inside ad-hoc construction code.
If this widget appears inside an interactive flow, keep the surrounding action binding in the parent component and test that the flow still has one clear reducer path.
Set id only when identity must be stable across filtering, reordering, diagnostics, or tests; otherwise let Fission derive identity from structure.
Check the semantics tree for the user-facing label or role that makes this widget understandable without relying only on pixels.
Prefer parent layout and design-system sizing first; use explicit size or spacing fields when the product layout requires that constraint on this widget specifically.
Add at least one component or harness test that confirms the visible text, semantic role, action dispatch, and layout constraint that matter for this widget in context.
If a screen starts repeating the same TableColumn setup, extract a named component around this widget. That keeps the reference API small while making product code easier to read and safer for generated code to copy.
DataTable, TableRow, Text, and Pagination.