TableEditingState

Row editing of one table: which row and column are being edited, and the consumer's edit callbacks.

Reached as TableState.editing. Every member here has a deprecated forwarder on TableState itself, kept for one release so existing call sites compile with a warning that names the replacement; the forwarders go away in the next major.

Editing drives selection: starting an edit selects the cell it starts in, and a refused completion re-selects the cell the consumer must return to. The dependency runs one way — the selection holder knows nothing about editing — so the pair cannot deadlock into mutual updates.

Properties

Link copied to clipboard
var column: C?

Currently focused editable column, or null if not editing.

Link copied to clipboard
var onEditCancel: (rowIndex: Int) -> Unit?

Callback when editing is cancelled.

Link copied to clipboard
var onRowEditComplete: (rowIndex: Int) -> Boolean?

Callback for row edit completion validation. Returns true to allow exit, false to stay in edit mode.

Link copied to clipboard
var onRowEditStart: (rowIndex: Int) -> Unit?

Callback when row editing starts. Only called when item is non-null.

Link copied to clipboard

Currently editing row index, or null if not editing.

Functions

Link copied to clipboard
fun cancel()

Cancel editing without validation. Calls onEditCancel and clears edit state.

Link copied to clipboard
fun completeCurrentCell(visibleColumns: List<ColumnSpec<*, C, *>>)

Complete editing the current cell and move to the next editable column. If no more editable columns in the row, attempts to complete row edit.

Link copied to clipboard
fun start(item: Any?, rowIndex: Int, column: C): Boolean

Start editing a specific row and column.

Link copied to clipboard

Attempt to complete the current row edit. Calls onRowEditComplete to validate.