Skip to main content

Module data_table

Module data_table 

Source
Expand description

DataTable (D115/Phase 32 Step 1) — the data-grid RENDERING layer on top of Table (the layout primitive): header row with sort-direction indicators, optional row-selection checkboxes, row striping. Sorting itself is rendering-only (per PHASE_32.md’s Out of Scope note) — the app owns the actual sort/comparator and re-passes already-sorted rows; on_sort just reports which column/direction the user asked for. Virtualization (windowed rendering for huge row counts) is explicitly OUT OF SCOPE for this MVP — named, not silently dropped.

Cells are plain text (the common tabular-data case) — richer per-cell widgets are future work. Rows are stored as Strings (Clone, cheap) rather than built BoxedWidgets specifically so a fresh Table can be constructed independently in both layout() and paint() (the widget protocol calls them separately on a borrowed &self, and Box<dyn Widget> isn’t Clone — building from owned strings sidesteps that rather than fighting it).

Structs§

DataTable
A data grid: typed columns + text row data, rendered via Table with a sortable header and optional selection checkboxes.
DataTableColumn
One column definition: header label + width policy.

Enums§

SortDirection