Skip to content

Type Editor


Type Editor / @type-editor/tables / utils/move-column / moveColumn

Function: moveColumn()

ts
function moveColumn(moveColParams): boolean;

Defined in: tables/src/utils/move-column.ts:59

Moves a column from the origin index to the target index within a table.

This function handles column movement by:

  1. Finding the table at the given position
  2. Determining the full range of columns to move (accounting for merged cells)
  3. Performing the move operation by transposing the table, moving rows, and transposing back
  4. Optionally selecting the moved column

Parameters

ParameterTypeDescription
moveColParamsMoveColumnParamsThe parameters for the column move operation.

Returns

boolean

true if the column was successfully moved, false otherwise.