TanStack

table_getSelectedCellCount

Function: table_getSelectedCellCount()

ts
function table_getSelectedCellCount<TFeatures, TData>(table): number;

Defined in: features/cell-selection/cellSelectionFeature.utils.ts:940

Returns the number of selected cells.

Uses rectangle arithmetic over the normalized, disjoint positive regions. A per-cell enableCellSelection predicate requires enumeration.

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

Parameters

table

Table_Internal<TFeatures, TData>

Returns

number

Example

ts
const count = table_getSelectedCellCount(table)