Unreleased APIs from PR #2. Not in 0.2.1. Stable 0.2.1 reference.
LOOM Unreleased (PR #2) / COLLECTIONS AND INTERACTION
TableState
Row/mark selection, optional cell selection, and two-axis scrolling owned by the caller.
Standard inherited Swift protocol operations such as synthesized equality and OptionSet set operations are not repeated. The public declarations below are extracted from the exact source revision listed in the coverage manifest.
Members on this page
Feature guides and release status
TableState
struct TableState<ID> where ID : HashableConforms to: Swift.Sendable, Swift.SendableMetatype.
Row/mark selection, optional cell selection, and two-axis scrolling owned by the caller.
Source · Table.swift:53rows
var rows: SelectionState<ID>A public field of this type. Its value type and mutability are shown in the declaration.
Source · Table.swift:54horizontal
var horizontal: ScrollStateA public field of this type. Its value type and mutability are shown in the declaration.
Source · Table.swift:55selectedColumn
var selectedColumn: Int? { get }A public field of this type. Its value type and mutability are shown in the declaration.
Source · Table.swift:56highlightedColumn
var highlightedColumn: Int? { get }A whole-column highlight independent of the selected cell.
Source · Table.swift:58init(selectedID:selectedColumn:)
init(selectedID: ID? = nil, selectedColumn: Int? = nil)Creates a value with the supplied arguments. Default arguments are shown in the declaration.
Parameters (2)
selectedID- Argument type and any default are shown in the declaration; see the behavior notes above.
selectedColumn- Argument type and any default are shown in the declaration; see the behavior notes above.
highlightColumn(_:)
mutating func highlightColumn(_ column: Int?)Sets the highlighted column independently of the selected body cell.
Parameters (1)
column- Argument type and any default are shown in the declaration; see the behavior notes above.
selectColumn(_:)
mutating func selectColumn(_ column: Int?)Selects a column and reveals it horizontally using synchronized column metrics.
Parameters (1)
column- Argument type and any default are shown in the declaration; see the behavior notes above.
selectCell(row:column:)
mutating func selectCell(row: ID, column: Int)Selects a stable row and a column, revealing both with the current metrics.
Parameters (2)
row- Document row coordinate.
column- Argument type and any default are shown in the declaration; see the behavior notes above.
moveColumn(by:)
mutating func moveColumn(by distance: Int)Moves the selected column by signed steps and reveals it horizontally.
Parameters (1)
by- Argument type and any default are shown in the declaration; see the behavior notes above.
handle(_:allowsMultipleSelection:)
@discardableResult mutating func handle(_ event: InputEvent, allowsMultipleSelection: Bool = false) -> BoolUp/down navigate rows; left/right navigate an active cell selection or scroll horizontally.
Parameters (2)
event- Argument type and any default are shown in the declaration; see the behavior notes above.
allowsMultipleSelection- Argument type and any default are shown in the declaration; see the behavior notes above.
Returns Bool.