Skip to content

Type Editor


Type Editor / @type-editor/tables / utils/in-same-table

utils/in-same-table

Functions

FunctionDescription

inSameTable

Checks if two cell positions are within the same table.

Two cells are considered to be in the same table if they have the same depth and the first cell's position is within the bounds of the second cell's parent table.

Example

typescript
if (inSameTable($anchorCell, $headCell)) {
  // Create a cell selection spanning these cells
}