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
| Parameter | Type | Description |
|---|---|---|
transaction | PmTransaction | The transaction to apply changes to |
tableRect | TableRect | The table rectangle containing map, table, and tableStart |
col | number | The column index to remove |
Returns
void