Documentation
¶
Overview ¶
DataTable SelectionColumn example — email inbox demo.
Demonstrates the SelectionColumn convenience constructor for batch operations on table rows. The UI has two modes:
Normal mode: click a row to "view" it (status label updates).
Batch mode: toggle the "Batch" button to reveal checkboxes in every
row. Select multiple messages, then "Archive" or "Delete"
them. Switch to radio mode with the "Radio" button to
restrict selection to a single row at a time.
Archive toggles a flag on selected rows (demonstrating in-place data binding updates via SetAt). Delete removes rows entirely. The message count label updates reactively via Array.LenRef().
Key APIs exercised:
- ui.SelectionColumn(key, visible, multi)
- ui.SetRowClickSelects(&col, true)
- table.SetSelectionMode / SelectedIndexes / ClearSelection
- Reactive Ref[bool] binding for column visibility and mode
- Array.SetAt for in-place item updates
- Array.LenRef + WatchEffect for reactive count display
Click to show internal directories.
Click to hide internal directories.