State & Handle

Controlled sort/filter/pagination/selection, JSON state round-trip, imperative handle, and event callbacks.

Use DataTableInitialState for one-time setup and controlled props for parent-owned models.

  • Parent components that own table state
  • Save/restore user grid preferences
  • Toolbar buttons that drive sort/filter/scroll imperatively
  • Pass sort, filter, pagination, and selection signals for controlled mode.
  • Wire DataTableEvents callbacks to keep parent state in sync.
  • Capture DataTableHandle via data_table_events.on_handle for imperative methods.
  • Call export_state / restore_state on DataTableState for persistence.
Controlled models

Parent-owned sort, filter, pagination, and selection with two-way sync via event callbacks.

none
Ada
Admin
Grace
Editor
Bob
Admin
Carol
Admin
Dan
Admin
State export and restore

Capture the full table state as JSON, reset, and restore for round-trip persistence.

Ada
Admin
Grace
Editor
Programmatic handle

Imperative sort, filter, search, and scroll via DataTableHandle.

Event callbacks

All DataTableEvents fire on real state changes; this preview logs each event.

Ada
Admin
Grace
Editor