TanStack

TableOptions_RowSelection

Interface: TableOptions_RowSelection<TFeatures, TData>

Defined in: features/row-selection/rowSelectionFeature.types.ts:34

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

Properties

enableMultiRowSelection?

ts
optional enableMultiRowSelection: boolean | (row) => boolean;

Defined in: features/row-selection/rowSelectionFeature.types.ts:48

Allows rows to be selected alongside other rows.

Provide a predicate to decide per row. Defaults to true.


enableRowRangeSelection?

ts
optional enableRowRangeSelection: boolean;

Defined in: features/row-selection/rowSelectionFeature.types.ts:42

Enables inclusive row range selection through row.getToggleSelectedHandler(). Defaults to true.


enableRowSelection?

ts
optional enableRowSelection: boolean | (row) => boolean;

Defined in: features/row-selection/rowSelectionFeature.types.ts:54

Allows rows to be selected.

Provide a predicate to decide per row. Defaults to true.


enableSubRowSelection?

ts
optional enableSubRowSelection: boolean | (row) => boolean;

Defined in: features/row-selection/rowSelectionFeature.types.ts:62

Controls whether selecting a parent row also selects its subRows.

Provide a predicate to decide per row. This is most useful with expanding or grouping features and defaults to true. Select-all and the all-selected getters also skip descendants of parents that block sub-row selection.


isRowRangeSelectionEvent()?

ts
optional isRowRangeSelectionEvent: (event) => boolean;

Defined in: features/row-selection/rowSelectionFeature.types.ts:70

Determines whether a row-selection handler event should select or deselect the inclusive range from the most recent handler interaction.

By default, events with shiftKey directly on the event or on event.nativeEvent are treated as range-selection events.

Parameters

event

unknown

Returns

boolean


onRowSelectionChange?

ts
optional onRowSelectionChange: OnChangeFn<RowSelectionState>;

Defined in: features/row-selection/rowSelectionFeature.types.ts:76

Called with an updater when row selection state changes. Pair this with state.rowSelection when using external state; external atoms can own the slice without this callback.