CellEditController

Handle given to a column's DataTableHeader.editorContent, for editors that are not plain text.

A custom editor renders whatever control it likes — a dropdown, a date picker, a lookup field — and calls commit or cancel when the user is done. It is composed in place of the cell's normal content and is expected to take keyboard focus itself.

Properties

Link copied to clipboard

The text the cell holds now, whatever began the edit. Differs from initialText only when the user typed over the cell.

Link copied to clipboard

Message from DataTableHeader.validateEdit rejecting the last attempted commit, or null when nothing has been rejected. Show it, and stay open.

Link copied to clipboard

The text the editor should start with: the cell's current value, or the character the user typed if the edit began by typing over the cell.

Functions

Link copied to clipboard
fun cancel()

Abandons the edit, leaving the row untouched and returning keyboard focus to the table.

Link copied to clipboard
fun commit(text: String)

Validates text and, if it passes, closes the editor and reports the edit through DataTable's onCellEdit.