Public API - Reference

State

scrollX

number
The current horizontal scroll offset in pixels.

maxScrollX

number
The max horizontal scroll offset in pixels.

availableScrollWidth

number
The available width upon which horizontal scrolling is possible.
i.e, this is the width of the scrollable region of the table's viewport.

groupHeaderHeight

number
The height of the group header in pixels.

isRTL

Boolean
Whether the table is in Right To Left mode.

Queries

NOTE: "columnIndex" refers to the global index of the column in relation to the whole table.
eg: Consider a table with 2 fixed columns A and B, and 3 scrollable columns X, Y and Z.
The columnIndex for each column will be: A - 0 B - 1 X - 2 Y - 3 Z - 4

getColumn()

getColumn(columnIndex: number) => Column

Get the column at the given index.

getColumnGroup()

Get the column group at the given index.

getColumnGroup(columnGroupIndex: number) => ColumnGroup

getColumnGroupByChild()

Get the column group for the given child column index.

getColumnGroupByChild(columnIndex: number, cellGroupType: CellGroupType) => ColumnGroup

getColumnAtOffset()

Get the column at given offset (in px) in relation to the specified CellGroup.

getColumnAtOffset(offset: number, cellGroupType: CellGroupType) => Column

getColumnGroupAtOffset()

Get the column group at given offset (in px) in relation to the specified CellGroup.

getColumnGroupAtOffset(offset: number, cellGroupType: CellGroupType) => ColumnGroup

getCellGroupWidth()

Get the total width of the specified CellGroup.

getCellGroupWidth(cellGroupType: CellGroupType) => number

getColumnCount()

Get the total count of columns under the specified CellGroup.
If cellGroupType isn't specified, then this returns the total count of columns.

getColumnCount(cellGroupType?: CellGroupType) => number

getColumnGroupCount()

Get the total count of column groups under the specified CellGroup.
If cellGroupType isn't specified, then this returns the total count of column groups.

getColumnGroupCount(cellGroupType?: CellGroupType) => number

Actions

scrollToX()

Scrolls the table to given horizontal offset.

function(scrollX: number)

updateRowHeights(firstUpdatedRowIndex)

In case of variable row heights the FDT asks only once for the row heights before the current visible rows (by calling rowHeightGetter()) and it caches those heights. If any of the row heights changes meantime, the user should call updateRowHeights(firstUpdatedRowIndex) in order for the new row heights to be updated starting with the firstUpdatedRowIndex If the method is called without passing the firstUpdatedRowIndex it updates all the row heights

function(firstUpdatedRowIndex: number)

Types

Column

interface Column { columnKey?: string index: number offset: number width: number }

ColumnGroup

interface ColumnGroup { columnKey?: string index: number offset: number width: number }

CellGroupType

enum CellGroupType { SCROLLABLE = "scrollable" FIXED = "fixed" FIXED_RIGHT = "fixedRight" }