Skip to content

开源白板工具(SaaS),一体化白板,包含思维导图、流程图、自由画等。All in one open-source whiteboard tool with mind, flowchart, freehand and etc.

fix(text): fix text can not editing (#52)

pubuzhixing8ee78a4028212
diff --git a/packages/react-board/src/wrapper.tsx b/packages/react-board/src/wrapper.tsx
index b286a61..c231082 100644
--- a/packages/react-board/src/wrapper.tsx
+++ b/packages/react-board/src/wrapper.tsx
@@ -110,7 +110,7 @@ export const Wrapper: React.FC<WrapperProps> = ({
BOARD_TO_ON_CHANGE.delete(board);
BOARD_TO_AFTER_CHANGE.delete(board);
};
- }, [board, onContextChange]);
+ }, [board]);
return (
<BoardContext.Provider value={context}>{children}</BoardContext.Provider>
diff --git a/packages/react-text/src/text.tsx b/packages/react-text/src/text.tsx
index 7db735a..da6e1f5 100644
--- a/packages/react-text/src/text.tsx
+++ b/packages/react-text/src/text.tsx
@@ -26,7 +26,7 @@ export const Text: React.FC<TextComponentProps> = (
const editor = withText(withHistory(withReact(createEditor())));
afterInit && afterInit(editor);
return editor;
- }, [afterInit]);
+ }, []);
return (
<Slate
editor={editor}