Table API Reference
Column API Reference
Row API Reference
Cell API Reference
Header API Reference
Features API Reference
- stockFeatures
- coreFeatures
- coreCellsFeature
- coreColumnsFeature
- coreHeadersFeature
- coreRowModelsFeature
- coreRowsFeature
- coreTablesFeature
- cellSpanningFeature
- columnFilteringFeature
- columnFacetingFeature
- rowAggregationFeature
- columnGroupingFeature
- columnOrderingFeature
- columnPinningFeature
- columnResizingFeature
- columnSizingFeature
- columnVisibilityFeature
- globalFilteringFeature
- rowExpandingFeature
- rowPaginationFeature
- rowPinningFeature
- rowSelectionFeature
- rowSortingFeature
- filterFns
- sortFns
- aggregationFns
- ColumnFilter
- ColumnPinningState
- ColumnSort
- PaginationState
- RowPinningState
- columnResizingState
- FilterFn
- FilterFns
- FilterMeta
- SortFn
- SortFns
- AggregationFns
- AggregationContext
- AggregationMergeContext
- AggregationFnDef
- AggregationFnDescriptor
- AggregationValueContext
- AggregationValueResult
- constructAggregationFn
- ColumnFiltersState
- ColumnOrderState
- ColumnPinningPosition
- ColumnResizeDirection
- ColumnResizeMode
- ColumnSizingState
- ColumnVisibilityState
- ExpandedState
- GroupingState
- RowPinningPosition
- RowSelectionState
- SortDirection
- SortingState
- AggregationFnOption
- AggregationResult
- FilterFnOption
- SortFnOption
- BuiltInAggregationFn
- BuiltInFilterFn
- BuiltInSortFn
Static Functions API Reference
Legacy API Reference
- Legacy API Overview
- useLegacyTable
- legacyCreateColumnHelper
- getCoreRowModel
- getFilteredRowModel
- getSortedRowModel
- getGroupedRowModel
- getExpandedRowModel
- getPaginationRowModel
- getFacetedRowModel
- getFacetedMinMaxValues
- getFacetedUniqueValues
- LegacyRowModelOptions
- LegacyTable
- LegacyTableOptions
- LegacyReactTable
- LegacyColumnDef
Table_CellSelection
Defined in: features/cell-selection/cellSelectionFeature.types.ts:207
Type Parameters#
TFeatures#
TFeatures extends TableFeatures
TData#
TData extends RowData
Properties#
_isSelectingCells#
_isSelectingCells: boolean;Defined in: features/cell-selection/cellSelectionFeature.types.ts:220
Internal
Whether a drag selection is currently open.
Non-reactive instance data rather than state: only the mouse handlers read it, nothing renders from it, and keeping it out of the slice means a selection persisted mid-drag cannot rehydrate into a stuck drag.
autoResetCellSelection#
autoResetCellSelection: () => void;Defined in: features/cell-selection/cellSelectionFeature.types.ts:227
Schedules a cell selection reset after data changes.
Honors autoResetAll and autoResetCellSelection. Called by the core row model; you rarely need to invoke it yourself.
Returns#
void
extendCellSelection#
extendCellSelection: (direction) => void;Defined in: features/cell-selection/cellSelectionFeature.types.ts:231
Extends the active range one step in a direction, keeping its anchor fixed.
Parameters#
direction#
Returns#
void
getCellSelectionBounds#
getCellSelectionBounds: () => CellSelectionBounds[];Defined in: features/cell-selection/cellSelectionFeature.types.ts:239
Returns the final positive selection as disjoint, inclusive display-order index rectangles after all include and exclude operations are applied.
This is the memoized cache every per-cell read goes through. Ranges whose corners no longer resolve are omitted.
Returns#
getCellSelectionColumnIds#
getCellSelectionColumnIds: () => string[];Defined in: features/cell-selection/cellSelectionFeature.types.ts:252
Returns the ids of all columns intersected by the selection.
Returns#
string[]
getCellSelectionColumnIndexes#
getCellSelectionColumnIndexes: () => Record<string, number>;Defined in: features/cell-selection/cellSelectionFeature.types.ts:261
Internal
Returns a column id to display-index map for the current column order.
Registered so the lookup stays memoized even when columnOrderingFeature is absent, since its getColumnIndexes static rebuilds on every call.
Returns#
Record<string, number>
getCellSelectionMergeBounds#
getCellSelectionMergeBounds: () => CellSelectionBounds[];Defined in: features/cell-selection/cellSelectionFeature.types.ts:248
Returns the merged-cell rectangles of the rendered rows in selection's display-order index space, or an empty array when cellSpanningFeature is not registered.
Selection rectangles expand to fully enclose these, so a merged cell is always entirely selected or entirely unselected.
Returns#
getCellSelectionRowIds#
getCellSelectionRowIds: () => string[];Defined in: features/cell-selection/cellSelectionFeature.types.ts:265
Returns the ids of all rows intersected by the selection.
Returns#
string[]
getFocusedCell#
getFocusedCell: () =>
| Cell<TFeatures, TData, any>
| undefined;Defined in: features/cell-selection/cellSelectionFeature.types.ts:270
Returns the active cell, i.e. the anchor of the most recent operation. An exclusion's active cell is focused even though it is not selected.
Returns#
| Cell<TFeatures, TData, any> | undefined
getSelectedCellCount#
getSelectedCellCount: () => number;Defined in: features/cell-selection/cellSelectionFeature.types.ts:277
Returns the number of selected cells.
Computed with rectangle arithmetic unless a per-cell enableCellSelection predicate requires enumeration.
Returns#
number
getSelectedCellIds#
getSelectedCellIds: () => string[];Defined in: features/cell-selection/cellSelectionFeature.types.ts:284
Returns the unique ids of all selected cells, in row-major order.
This expands the selection, so it costs one pass over the selected area. It is memoized and never runs unless called.
Returns#
string[]
getSelectedCellRangesData#
getSelectedCellRangesData: () => unknown[][][];Defined in: features/cell-selection/cellSelectionFeature.types.ts:292
Returns each final positive selection region's values as a row-major grid.
Indexed as [regionIndex][rowIndex][columnIndex]. Serializing this to clipboard text is left to userland, since the delimiter, the null representation, and any quoting rules are application decisions.
Returns#
unknown[][][]
moveCellSelection#
moveCellSelection: (direction) => void;Defined in: features/cell-selection/cellSelectionFeature.types.ts:297
Moves the selection one step in a direction, collapsing it to a single cell. Columns that cannot be selected are skipped over.
Parameters#
direction#
Returns#
void
resetCellSelection#
resetCellSelection: (defaultState?) => void;Defined in: features/cell-selection/cellSelectionFeature.types.ts:303
Resets cellSelection to initialState.cellSelection.
Pass true to ignore initial state and reset to an empty selection.
Parameters#
defaultState?#
boolean
Returns#
void
selectAllCells#
selectAllCells: () => void;Defined in: features/cell-selection/cellSelectionFeature.types.ts:307
Selects every selectable cell in the table as one range.
Returns#
void
selectCellRange#
selectCellRange: (range, opts?) => void;Defined in: features/cell-selection/cellSelectionFeature.types.ts:311
Selects a rectangle using the requested replace/include/exclude mode.
Parameters#
range#
opts?#
Returns#
void
setCellSelection#
setCellSelection: (updater) => void;Defined in: features/cell-selection/cellSelectionFeature.types.ts:318
Updates cell selection state with a next value or updater function.
Parameters#
updater#
Returns#
void
setFocusedCell#
setFocusedCell: (rowId, columnId) => void;Defined in: features/cell-selection/cellSelectionFeature.types.ts:322
Collapses the selection to a single cell at the given coordinates.
Parameters#
rowId#
string
columnId#
string
Returns#
void