SelectionMode
Since v0.1.1
Selection mode for the grid.
Each mode offers different selection behavior suited to different use cases:
| Mode | Use Case | Behavior |
|---|---|---|
'cell' | Spreadsheet-style editing | Single cell focus. Click to select one cell at a time. |
'row' | Record-based operations | Full row selection. Click anywhere to select the entire row. |
'column' | Spreadsheet-style column operations | Full column selection. Activated via Ctrl+Click on header or Ctrl+Space on a focused cell. |
'range' | Bulk operations, export | Rectangular selection. Drag or Shift+Click to select ranges. |
mode may also be an array to enable column selection alongside one in-row mode
(['row', 'column'], ['cell', 'column'], or ['range', 'column']). When both axes
are enabled, they are mutually exclusive at runtime — selecting a column clears any row
selection, and selecting a row clears any column selection. Only column-paired arrays
are valid; combining other modes (e.g. ['row', 'cell']) throws at attach time.
type SelectionMode = "cell" | "row" | "column" | "range"Example
Section titled “Example”// Cell mode (default) - for spreadsheet-like interactionnew SelectionPlugin({ mode: 'cell' })
// Row mode - for selecting complete recordsnew SelectionPlugin({ mode: 'row' })
// Column mode - for column-wise operations (copy column, hide column)new SelectionPlugin({ mode: 'column' })
// Range mode - for bulk copy/paste operationsnew SelectionPlugin({ mode: 'range' })
// Both row and column - mutually exclusive at runtimenew SelectionPlugin({ mode: ['row', 'column'] })See Also
Section titled “See Also”- Cell Mode Demo — Click cells to select
- Row Mode Demo — Full row selection
- Range Mode Demo — Drag to select ranges
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://toolboxjs.com/llms-full.txt