CellEdit

@Immutable
data class CellEdit<T>(val item: T, val rowKey: Any, val columnKey: String, val oldText: String, val newText: String)(source)

A committed cell edit, handed to DataTable's onCellEdit.

The table never mutates your data: it reports the edit and waits for you to apply it and pass the updated items back. That keeps a single source of truth in your model, which is what makes undo, dirty tracking, and server round-trips possible at all.

Only edits that actually change the text are reported — committing a cell you did not alter fires nothing.

Constructors

Link copied to clipboard
constructor(item: T, rowKey: Any, columnKey: String, oldText: String, newText: String)

Properties

Link copied to clipboard

DataTableHeader.key of the edited column.

Link copied to clipboard
val item: T

The row item that was edited.

Link copied to clipboard

The text the user committed. Parsing it back into your model's type is the caller's job — pair it with DataTableHeader.validateEdit so an unparseable value never reaches here.

Link copied to clipboard

The cell's text before the edit, as the editor was seeded with it.

Link copied to clipboard
val rowKey: Any

Key of that row, as produced by DataTable's itemKey.