From 8893b447e1396549d53f0d83810f88268a1866a8 Mon Sep 17 00:00:00 2001 From: Oliver Crowe Date: Fri, 10 May 2024 10:43:51 +0100 Subject: [PATCH] set table update to discrete and dispatched nested update --- src/plugins/table/TableEditor.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/plugins/table/TableEditor.tsx b/src/plugins/table/TableEditor.tsx index 71de816f..6b786a98 100644 --- a/src/plugins/table/TableEditor.tsx +++ b/src/plugins/table/TableEditor.tsx @@ -378,9 +378,13 @@ const CellEditor: React.FC = ({ 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)