Skip to main content

CellSpanIndex

还没翻译译自英文(tanstack.com)本页 22 段都还没译

Defined in: features/cell-spanning/cellSpanningFeature.types.ts:13

The table's cell span index for the rows that are currently rendered.

Cell APIs read this; it is exposed for devtools and for virtualizers that need to know where a run's anchor sits relative to the rendered window.

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

Properties

colSpans

colSpans: (Int32Array<ArrayBufferLike> | undefined)[];

Defined in: features/cell-spanning/cellSpanningFeature.types.ts:23

Column spans per render-order row position, indexed by render-order column position. Holes are the common case: only rows that declared a column span get an array. In a stored array, the spanning cell holds its span and the cells it covers hold 0; every other cell holds 1.


columnIndexes

columnIndexes: Record<string, number>;

Defined in: features/cell-spanning/cellSpanningFeature.types.ts:27

Render-order index for every visible column id. Hidden columns are absent.


rows

rows: readonly Row<TFeatures, TData>[];

Defined in: features/cell-spanning/cellSpanningFeature.types.ts:40

The exact ordered rows this index was built from, in render order: top-pinned rows, then the (paginated) center rows, then bottom-pinned rows. Cell reads compare against this to reject stale row positions.


rowSpans

rowSpans: Record<string, Int32Array>;

Defined in: features/cell-spanning/cellSpanningFeature.types.ts:34

Row spans per column id, indexed by render-order row position. Only columns that produced at least one run longer than one row appear here; a missing column means every cell in it spans exactly one row. In a stored array, the run's anchor row holds the run length and the rows it covers hold 0.