CellRange

@Immutable
data class CellRange(val anchor: CellPosition, val focus: CellPosition)(source)

A selected block of cells, from the anchor corner to the cursor.

Either corner may be the top-left one — anchor is simply where the selection started and focus is where the cursor is now, so dragging up and left is as ordinary as dragging down and right. Use DataTableState.isCellInRange to test membership rather than comparing corners.

Constructors

Link copied to clipboard
constructor(anchor: CellPosition, focus: CellPosition)

Properties

Link copied to clipboard

The corner that stays put while the selection is extended.

Link copied to clipboard

The corner the cursor is on, which is also DataTableState.focusedCell.