From 190ff50a500333f101e36a8a7b07575189af9c24 Mon Sep 17 00:00:00 2001 From: neysanfoo Date: Mon, 14 Oct 2024 01:03:56 +0800 Subject: [PATCH] revert iseditable checks --- .../src/plugins/TableHoverActionsPlugin/index.tsx | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/packages/lexical-playground/src/plugins/TableHoverActionsPlugin/index.tsx b/packages/lexical-playground/src/plugins/TableHoverActionsPlugin/index.tsx index 73705baa241..ecdb9dd9c97 100644 --- a/packages/lexical-playground/src/plugins/TableHoverActionsPlugin/index.tsx +++ b/packages/lexical-playground/src/plugins/TableHoverActionsPlugin/index.tsx @@ -46,9 +46,6 @@ function TableHoverActionsContainer({ const debouncedOnMouseMove = useDebounce( (event: MouseEvent) => { - if (!isEditable) { - return; - } const {isOutside, tableDOMNode} = getMouseInfo(event); if (isOutside) { @@ -156,9 +153,6 @@ function TableHoverActionsContainer({ editor.registerMutationListener( TableNode, (mutations) => { - if (!isEditable) { - return; - } editor.getEditorState().read(() => { for (const [key, type] of mutations) { switch (type) { @@ -181,12 +175,9 @@ function TableHoverActionsContainer({ {skipInitialization: false}, ), ); - }, [editor, isEditable]); + }, [editor]); const insertAction = (insertRow: boolean) => { - if (!isEditable) { - return; - } editor.update(() => { if (tableDOMNodeRef.current) { const maybeTableNode = $getNearestNodeFromDOMNode(