Infinite Table Keyboard Navigation API

Available starting with version 6.1.1.

See the Keyboard Navigation page for more details.

Configuring the keyboard navigation to be 'cell'
<InfiniteTable keyboardNavigation="cell" />

// can be "cell" (default), "row" or false

You can retrieve the keyboard navigation api by reading it from the api.keyboardNavigationApi property.


const onReady = ({api}: {api:InfiniteTableApi<DATA_TYPE>}) => {
  // do something with it
  api.keyboardNavigationApi.gotoCell({direction: 'top'})
}

<InfiniteTable<DATA_TYPE>
  columns={[...]}
  onReady={onReady}

See the Infinite Table API page for the main API. See the Infinite Table Cell Selection API page for the row selection API. See the Infinite Table Row Selection API page for the row selection API. See the Infinite Table Column API page for the column API.

gotoCell

({direction: 'top' | 'bottom' | 'left' | 'right' }) => [number, number] | false

Changes the active cell index, by navigating to the specified direction (equivalent to pressing the arrow keys). See related setActiveCellIndex

gotoNextRow

()=> number | false

Changes the active row index to the next row. See related gotoPreviousRow, setActiveRowIndex

gotoPreviousRow

()=> number | false

Changes the active row index to the prev row. See related gotoNextRow, setActiveRowIndex

setActiveCellIndex

(activeCellIndex: [number, number]) => void

Sets the value for defaultActiveCellIndex/activeCellIndex See related gotoCell

setActiveRowIndex

(activeRowIndex: number) => void

setKeyboardNavigation

(keyboardNavigation: 'cell'|'row'|false) => void

Sets the keyboard navigation mode. See keyboardNavigation