Skip to content

Type Editor


Type Editor / @type-editor/tables / commands/remove-column / removeColumn

Function: removeColumn()

ts
function removeColumn(transaction, tableRect, col): void;

Defined in: tables/src/commands/remove-column.ts:21

Removes a column at the specified position from a table.

This function handles:

  • Reducing colspan for cells that span across the removed column
  • Deleting cells that only occupy the removed column
  • Properly updating position mappings during the operation

Parameters

ParameterTypeDescription
transactionPmTransactionThe transaction to apply changes to
tableRectTableRectThe table rectangle containing map, table, and tableStart
colnumberThe column index to remove

Returns

void