Skip to content

Commit

Permalink
Merge branch 'main' into selection-node
Browse files Browse the repository at this point in the history
  • Loading branch information
ivailop7 authored Sep 27, 2024
2 parents 7a857f6 + d83bde3 commit ba6cbd2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/lexical-table/src/LexicalTableUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,9 @@ export function $deleteTableRow__EXPERIMENTAL(): void {
$isRangeSelection(selection) || $isTableSelection(selection),
'Expected a RangeSelection or TableSelection',
);
const anchor = selection.anchor.getNode();
const focus = selection.focus.getNode();
const [anchor, focus] = selection.isBackward()
? [selection.focus.getNode(), selection.anchor.getNode()]
: [selection.anchor.getNode(), selection.focus.getNode()];
const [anchorCell, , grid] = $getNodeTriplet(anchor);
const [focusCell] = $getNodeTriplet(focus);
const [gridMap, anchorCellMap, focusCellMap] = $computeTableMap(
Expand Down

0 comments on commit ba6cbd2

Please sign in to comment.