From 5b083e338d59d2d828b38c75d273f5421d5ba69f Mon Sep 17 00:00:00 2001 From: ModestFun <61576426+ModestFun@users.noreply.github.com> Date: Tue, 26 Dec 2023 17:56:17 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20add=20beforeChange=20and=20?= =?UTF-8?q?beforeConnect=20function=20for=20FlowEditor.=20(#56)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * :memo: feat: rm block * :memo: fix: ci * :memo: fix: ci * :memo: fix: quick-start link * :bug: fix: ci * :sparkles: feat: add before function * :bug: fix: remove console log * :bug: fix: remove button * :bug: fix: demo recode --------- Co-authored-by: jiangchu --- docs/guide/demos/flowEditor/btnGroup.tsx | 2 -- src/FlowEditor/container/FlowEditor.tsx | 23 ++++++++++++++++++- src/FlowEditor/container/index.tsx | 6 +++++ src/FlowEditor/demos/index.tsx | 1 - src/FlowEditor/hooks/useHotkeyManager.ts | 7 +++--- .../store/slices/generalActionSlice.ts | 6 ++--- 6 files changed, 34 insertions(+), 11 deletions(-) diff --git a/docs/guide/demos/flowEditor/btnGroup.tsx b/docs/guide/demos/flowEditor/btnGroup.tsx index be31d2a..388ec83 100644 --- a/docs/guide/demos/flowEditor/btnGroup.tsx +++ b/docs/guide/demos/flowEditor/btnGroup.tsx @@ -22,7 +22,6 @@ export const BtnGroup = (props) => { onClick={() => { const nodes = editor.getFlattenNodes(); const index = nodes ? Object.keys(nodes).length + 1 : 1; - console.log(index); editor.addNode({ id: `a${index}`, @@ -43,7 +42,6 @@ export const BtnGroup = (props) => {