datatable-selection

command
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2026 License: MIT Imports: 5 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL