Type Editor / @type-editor/tables / commands/add-row / addRow
Function: addRow()
ts
function addRow(transaction, tableRect, row): PmTransaction;Defined in: tables/src/commands/add-row.ts:23
Adds a row at the given position in a table.
This function handles:
- Extending cells that span across the insertion point via rowspan
- Creating new cells with the appropriate type (header or regular)
- Maintaining table structure integrity
Parameters
| Parameter | Type | Description |
|---|---|---|
transaction | PmTransaction | The transaction to apply changes to |
tableRect | TableRect | The table rectangle containing map, tableStart, and table |
row | number | The row index where the new row should be inserted |
Returns
PmTransaction
The modified transaction