GridNavigation

Properties

5

Class hierarchy

isGridNavigation: Boolean= truereadonly
Identifies an object as an instance of GridNavigation class, or subclass thereof.
isGridNavigation: Boolean= truereadonlystatic
Identifies an object as an instance of GridNavigation class, or subclass thereof.

Other

cellCSSSelector: Stringreadonly

CSS selector for currently focused cell. Format is "[data-index=index] [data-column-id=columnId]".

Grid GridLocation which encapsulates the currently focused cell. Set to focus a cell or use focusCell.

isActionableLocation: Booleanreadonly

This property is true if an element within a cell is focused.

Functions

7

Navigates to a cell and/or its row (depending on selectionMode)

ParameterTypeDescription
cellSelectorGridLocationConfig | GridLocation

Cell location descriptor

optionsObject

Modifier options for how to deal with focusing the cell. These are used as the scrollTo options.

options.scrollBryntumScrollOptions | Boolean

Pass false to not scroll the cell into view, or a scroll options object to affect the scroll.

Returns: GridLocation -

A GridLocation object representing the focused location.

Checks whether a cell is focused.

ParameterTypeDescription
cellSelectorGridLocationConfig | GridLocation | String | Number

Cell selector { id: x, columnId: xx } or row id

Returns: Boolean -

true if cell or row is focused, otherwise false

Navigates to the cell below the currently focused cell

Returns: GridLocation -

Selector for focused row (& cell)

Select the cell before the currently focused one.

Returns: GridLocation -

Cell selector

Select the cell after the currently focused one.

Returns: GridLocation -

Cell selector

Navigates to the cell above the currently focused cell

Returns: GridLocation -

Selector for focused row (& cell)

Called by the RowManager when the row which contains the focus location is derendered.

This keeps focus in a consistent place.

Events

1

Triggered when a user navigates to a grid cell

// Adding a listener using the "on" method
gridNavigation.on('navigate', ({ event, eventName, focusedCell, lastFocusedCell, source, type }) => {

});
ParameterTypeDescription
eventEvent

The UI event which caused navigation.

eventNameString

The name of the event

focusedCellGridLocation

The currently focused cell

lastFocusedCellGridLocation

The previously focused cell

sourceGrid

The grid instance

typeString

The type of the event

Event handlers

1

Called when a user navigates to a grid cell

new GridNavigation({
    onNavigate({ event, eventName, focusedCell, lastFocusedCell, source, type }) {

    }
});
ParameterTypeDescription
eventEvent

The UI event which caused navigation.

eventNameString

The name of the event

focusedCellGridLocation

The currently focused cell

lastFocusedCellGridLocation

The previously focused cell

sourceGrid

The grid instance

typeString

The type of the event