Skip to content

@serenity-is/sleekgrid / CellNavigation

Interface: CellNavigation

Defined in: src/core/cellnavigation.ts:14

Contract for keyboard / programmatic navigation of the active cell. Implemented by the grid so that editors, plugins and external code can move focus without coupling to internal navigation logic.

Extended by

Methods

navigate(dir): boolean

Defined in: src/core/cellnavigation.ts:95

Navigate the active cell in the specified direction.

Parameters

dir

CellNavigationDirection

Navigation direction.

Returns

boolean

Whether navigation resulted in a change of the active cell.


navigateBottom(): void

Defined in: src/core/cellnavigation.ts:18

Moves the active cell to the last row of the data set.

Returns

void


navigateDown(): boolean

Defined in: src/core/cellnavigation.ts:24

Moves the active cell one row down.

Returns

boolean

true if the active cell changed, false if already at the bottom or blocked.


navigateLeft(): boolean

Defined in: src/core/cellnavigation.ts:30

Moves the active cell one column to the left.

Returns

boolean

true if the active cell changed.


navigateNext(): boolean

Defined in: src/core/cellnavigation.ts:36

Moves the active cell to the next focusable cell (row-major order, wrapping rows).

Returns

boolean

true if the active cell changed.


navigatePageDown(): void

Defined in: src/core/cellnavigation.ts:41

Scrolls one page down and moves the active cell accordingly.

Returns

void


navigatePageUp(): void

Defined in: src/core/cellnavigation.ts:46

Scrolls one page up and moves the active cell accordingly.

Returns

void


navigatePrev(): boolean

Defined in: src/core/cellnavigation.ts:52

Moves the active cell to the previous focusable cell (reverse row-major order).

Returns

boolean

true if the active cell changed.


navigateRight(): boolean

Defined in: src/core/cellnavigation.ts:58

Moves the active cell one column to the right.

Returns

boolean

true if the active cell changed.


navigateRowEnd(): boolean

Defined in: src/core/cellnavigation.ts:64

Moves the active cell to the last cell of the current row.

Returns

boolean

true if the active cell changed.


navigateRowStart(): boolean

Defined in: src/core/cellnavigation.ts:70

Moves the active cell to the first cell of the current row.

Returns

boolean

true if the active cell changed.


navigateTop(): void

Defined in: src/core/cellnavigation.ts:75

Moves the active cell to the first row of the data set.

Returns

void


navigateToRow(row): boolean

Defined in: src/core/cellnavigation.ts:82

Moves the active cell to the specified row, keeping the current column if possible.

Parameters

row

number

Zero-based row index to navigate to.

Returns

boolean

true if the active cell changed.


navigateUp(): boolean

Defined in: src/core/cellnavigation.ts:88

Moves the active cell one row up.

Returns

boolean

true if the active cell changed.