Skip to content

Commit a40557a

Browse files
authored
fix: wrong position when adding new row (#167)
1 parent 04e959f commit a40557a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/table-utils/commands/appendRow.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const appendRow: CommandWithAttrs<{
3939
});
4040

4141
let position = tablePos + parentRow.pos;
42-
position += direction === 'before' ? 1 : parentRow.node.nodeSize + 2;
42+
position += direction === 'before' ? 1 : parentRow.node.nodeSize + 1;
4343

4444
dispatch(state.tr.insert(position, parentRow.node.copy(Fragment.from(newCellNodes))));
4545
}

0 commit comments

Comments
 (0)