本页还没有译文
本页 47 段还没译成한국어,下面显示的是英文原文。TableOptions_CellSelection
还没翻译译自英文(tanstack.com)本页 47 段都还没译
Defined in: features/cell-selection/cellSelectionFeature.types.ts:89
Type Parameters
TFeatures
TFeatures extends TableFeatures
TData
TData extends RowData
Properties
autoResetCellSelection?
optional autoResetCellSelection?: boolean;Defined in: features/cell-selection/cellSelectionFeature.types.ts:102
Resets cell selection to initialState.cellSelection whenever data
changes. Defaults to true.
Ranges are stored as row and column ids, so new data would otherwise leave
a selection pointing at rows that no longer exist, or silently re-select
cells if the new data happens to reuse ids. Set to false to keep ranges
across data changes, and note autoResetAll overrides this.
enableCellRangeSelection?
optional enableCellRangeSelection?: boolean;Defined in: features/cell-selection/cellSelectionFeature.types.ts:107
Enables inclusive cell range selection through shift-click and drag.
Defaults to true.
enableCellSelection?
optional enableCellSelection?: boolean | ((cell) => boolean);Defined in: features/cell-selection/cellSelectionFeature.types.ts:114
Allows cells to be selected.
Provide a predicate to decide per cell. A column def may also opt out with
its own enableCellSelection: false. Defaults to true.
enableCellSelectionDrag?
optional enableCellSelectionDrag?: boolean;Defined in: features/cell-selection/cellSelectionFeature.types.ts:119
Enables extending a selection by dragging across cells. Defaults to true.
enableMultiCellRangeSelection?
optional enableMultiCellRangeSelection?: boolean;Defined in: features/cell-selection/cellSelectionFeature.types.ts:123
Allows modifier interactions to add or subtract ranges. Defaults to true.
isCellRangeSelectionEvent?
optional isCellRangeSelectionEvent?: (event) => boolean;Defined in: features/cell-selection/cellSelectionFeature.types.ts:131
Determines whether a selection-start event should extend the active range instead of replacing the selection.
By default, events with shiftKey directly on the event or on
event.nativeEvent are treated as range-selection events.
Parameters
event
unknown
Returns
boolean
isMultiCellRangeSelectionEvent?
optional isMultiCellRangeSelectionEvent?: (event) => boolean;Defined in: features/cell-selection/cellSelectionFeature.types.ts:139
Determines whether a selection-start event should add or subtract a new rectangle. The operation depends on whether the starting cell is selected.
By default, events with ctrlKey or metaKey directly on the event or on
event.nativeEvent are treated as multi-range events.
Parameters
event
unknown
Returns
boolean
onCellSelectionChange?
optional onCellSelectionChange?: OnChangeFn<CellSelectionState>;Defined in: features/cell-selection/cellSelectionFeature.types.ts:148
Called with an updater when cell selection state changes. Pair this with
state.cellSelection when using external state; external atoms can own the
slice without this callback.
A drag emits one change per cell crossed. Subscribe to
table.atoms.cellSelection for finer-grained reads when that matters.