Interface FocusModelIf

The focused cell of a table (moved by click and arrow keys; F2 edits it). The implementation is FocusModel; changes are reported to EventListenerIf.onFocusChanged.

Example

override onFocusChanged(model: FocusModelIf): void {
const [row, col] = model.getFocus();
console.log(`focus on row ${row}, column ${col}`);
}

Hierarchy

  • FocusModelIf

Implemented by

Methods

  • Optional (live data, since 1.1.108): the focused row moves along when rows were removed at the start or inserted (tableApi.appendRows()). Same row: no event. Focused row removed: the next remaining row gets the focus (with an event).

    Parameters

    Returns void

    Example

    focusModel.adjustForRowChanges?.(new RowIndexShift([0], []));