diff --git a/packages/lexical-playground/src/plugins/TableActionMenuPlugin/index.tsx b/packages/lexical-playground/src/plugins/TableActionMenuPlugin/index.tsx index 9df7c6355f5..46096a69ec6 100644 --- a/packages/lexical-playground/src/plugins/TableActionMenuPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/TableActionMenuPlugin/index.tsx @@ -516,6 +516,19 @@ function TableActionMenu({ }); }, [editor, tableCellNode, clearTableSelection, onClose]); + const toggleFirstRowFreeze = useCallback(() => { + editor.update(() => { + if (tableCellNode.isAttached()) { + const tableNode = $getTableNodeFromLexicalNodeOrThrow(tableCellNode); + if (tableNode) { + tableNode.setFrozenRows(tableNode.getFrozenRows() === 0 ? 1 : 0); + } + } + clearTableSelection(); + onClose(); + }); + }, [editor, tableCellNode, clearTableSelection, onClose]); + const toggleFirstColumnFreeze = useCallback(() => { editor.update(() => { if (tableCellNode.isAttached()) { @@ -670,6 +683,13 @@ function TableActionMenu({ +