Skip to content

Commit

Permalink
Merge pull request #454 from oliver-crowe-bp/fix-nested-table
Browse files Browse the repository at this point in the history
Fix updating of table inside nested editor
  • Loading branch information
petyosi authored May 12, 2024
2 parents 29e0f54 + 8893b44 commit 8ab07db
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/plugins/table/TableEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,13 @@ const CellEditor: React.FC<CellProps> = ({ focus, setActiveCell, parentEditor, l
visitors: exportVisitors,
jsxIsAvailable
})
parentEditor.update(() => {
lexicalTable.updateCellContents(colIndex, rowIndex, (mdast.children[0] as Mdast.Paragraph).children)
})
parentEditor.update(
() => {
lexicalTable.updateCellContents(colIndex, rowIndex, (mdast.children[0] as Mdast.Paragraph).children)
},
{ discrete: true }
)
parentEditor.dispatchCommand(NESTED_EDITOR_UPDATED_COMMAND, undefined)
})

setActiveCell(nextCell)
Expand Down

0 comments on commit 8ab07db

Please sign in to comment.