Column Definition

Defines how each column binds to dataset fields, formats values, and renders cells.

Use DataTableColumnDef for every column in the columns prop. Set ColumnType for typed sort and filter behavior, and attach custom views with cell_view or header_view.

  • Defining the column schema for a new table
  • Custom cell rendering (badges, links, formatted numbers)
  • Typed sort and filter operators per column
  • Create one DataTableColumnDef per visible column with field matching a FieldDef key.
  • Set ColumnType when the column is not plain text.
  • Attach cell_view or header_view for custom rendering.
  • Pass the vec to DataTable via the columns prop.
Custom status column
Active
Pending
Typed numeric sort

Number columns sort numerically (2 before 10), not lexicographically.

10
2
Custom column header

Custom header_view and description tooltip on a column.

95