Skip to content

Commit

Permalink
fix unmerge
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaanj committed Nov 28, 2023
1 parent 3f029b9 commit 7f86a89
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/table/src/merge/unmergeTableCells.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
import { ELEMENT_TABLE, ELEMENT_TR } from '../createTablePlugin';
import { getTableGridAbove } from '../queries';
import { getColSpan } from '../queries/getColSpan';
import { getRowSpan } from '../queries/getRowSpan';
import { TablePlugin, TTableCellElement, TTableRowElement } from '../types';
import { getEmptyCellNode } from '../utils';
import { getCellIndices } from './getCellIndices';
Expand Down Expand Up @@ -45,8 +46,8 @@ export const unmergeTableCells = <V extends Value = Value>(

const cellPath = path.slice(-2);
const [rowPath, colPath] = cellPath;
const colSpan = cellElem.colSpan as number;
const rowSpan = cellElem.rowSpan as number;
const colSpan = getColSpan(cellElem as TTableCellElement);
const rowSpan = getRowSpan(cellElem as TTableCellElement);

// Generate an array of column paths from the colspan
const colPaths: number[] = [];
Expand Down

0 comments on commit 7f86a89

Please sign in to comment.