TableSelectionState

Row and cell selection of one table: the focused row, the checked rows and the selected cell.

Reached as TableState.selection. 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.

The selected cell keeps its declared type TableState.SelectedCell: it is public API pinned by 2.0.0, and a nested class cannot be re-exported under a new name the way a function can, so moving it here would break every consumer that names the type.

Properties

Link copied to clipboard
Link copied to clipboard

Selected cell, or null when no cell is selected.

Link copied to clipboard

Focused row index, or null when nothing is selected.

Functions

Link copied to clipboard
fun focusRow(index: Int)

Set focused row to index without toggling selection.

Link copied to clipboard
fun selectCell(rowIndex: Int, column: C)

Select a specific cell at rowIndex and column.

Link copied to clipboard
fun toggleCheck(index: Int)

Toggle checkmark state for index in Multiple selection mode.

Link copied to clipboard
fun toggleCheckAll(count: Int)

Check/uncheck all rows based on current count in Multiple selection mode.

Link copied to clipboard
fun toggleRow(index: Int)

Toggle row selection for index according to TableSettings.selectionMode.